Fix Newsweek.pl (css)

This commit is contained in:
magnolia1234 2024-03-20 19:25:52 +01:00
parent 818fe15b36
commit 3931fb846d
3 changed files with 14 additions and 14 deletions

View file

@ -6,6 +6,7 @@ Post-release
Add Blick.ch (Ringier Gruppe) Add Blick.ch (Ringier Gruppe)
Add CNN (regwall) Add CNN (regwall)
Fix Expresso.pt (json) Fix Expresso.pt (json)
Fix Newsweek.pl (css)
Fix The Athletic (scroll) Fix The Athletic (scroll)
* v3.6.0.0 (2024-03-17) * v3.6.0.0 (2024-03-17)

View file

@ -4813,18 +4813,17 @@ else if (matchDomain('newsweek.com')) {
} }
else if (matchDomain('newsweek.pl')) { else if (matchDomain('newsweek.pl')) {
let clear_ads = function () { let premium = document.querySelector('div.contentPremium[style]');
window.setTimeout(function () { if (premium) {
let ads = document.querySelectorAll('[class^="pwAds"], .hide-for-paying, div#contentPremiumPlaceholder > span, div.onet-ad'); premium.removeAttribute('class');
hideDOMElement(...ads); premium.removeAttribute('style');
}, 2000);
} }
func_post = function () { let placeholder = document.querySelector('div#contentPremiumPlaceholder[class]');
clear_ads(); if (placeholder)
} placeholder.removeAttribute('class');
let url = window.location.href; let ads = document.querySelectorAll('[class^="pwAds"], .hide-for-paying, div.onet-ad, div.bottomBar');
getArchive(url, 'div#contentPremiumPlaceholder', '', 'div#article-content-body'); console.log(ads);
clear_ads(); hideDOMElement(...ads);
} }
else if (matchDomain(['nola.com', 'theadvocate.com'])) { else if (matchDomain(['nola.com', 'theadvocate.com'])) {

View file

@ -1814,10 +1814,10 @@ var defaultSites = {
domain: "newsweek.com", domain: "newsweek.com",
block_regex: /(js\.pelcro\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ block_regex: /(js\.pelcro\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/
}, },
"Newsweek.pl (fetch from archive.is)": { "Newsweek.pl": {
domain: "newsweek.pl", domain: "newsweek.pl",
allow_cookies: 1, allow_cookies: 1,
cs_dompurify: 1 block_regex: /cdn\.cxense\.com\//
}, },
"NHST Media Group": { "NHST Media Group": {
domain: "###_no_nhst_media", domain: "###_no_nhst_media",
@ -2982,7 +2982,7 @@ var defaultSites = {
domain: "piano.io", domain: "piano.io",
allow_cookies: 1, allow_cookies: 1,
block_regex_general: /\.piano\.io\/xbuilder\/experience\/execute/, block_regex_general: /\.piano\.io\/xbuilder\/experience\/execute/,
excluded_domains: ["piano.io", "asia.nikkei.com", "businessinsider.com.pl", "hbr.org", "japantimes.co.jp", "nacion.com", "onet.pl"] excluded_domains: ["piano.io", "asia.nikkei.com", "businessinsider.com.pl", "hbr.org", "japantimes.co.jp", "nacion.com", "newsweek.pl", "onet.pl"]
}, },
"Pico.tools": { "Pico.tools": {
domain: "pico.tools", domain: "pico.tools",