From 0dc9fb033a163cbb0ba3e61b49237f19b636ddd4 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 15 Nov 2023 19:25:27 +0100 Subject: [PATCH] Fix South China Morning Post (css) --- changelog.txt | 1 + contentScript.js | 5 ++++- custom/manifest.json | 2 +- manifest.json | 2 +- sites.js | 3 ++- sites_updated.json | 7 +++++++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 687b680..7c790b1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Add Doorbraak.be Add Moda.it (GEDI.it) Add Welt.de (link to archive.is) Fix FreiePresse.de +Fix South China Morning Post (css) * v3.4.2.0 (2023-11-12) Add Haymarket Media Group (opt-in to custom sites) diff --git a/contentScript.js b/contentScript.js index 2f28ad4..3ac9db2 100644 --- a/contentScript.js +++ b/contentScript.js @@ -4582,7 +4582,10 @@ else if (matchDomain('scmp.com')) { let section_hidden = document.querySelectorAll('section[data-qa="ContentBody-ContentBodyContainer"][class]'); for (let elem of section_hidden) elem.removeAttribute('class'); - let ads = document.querySelectorAll('div[data-qa*="AdSlot"]'); + let paywalled = document.querySelector('div.paywalled-content'); + if (paywalled) + paywalled.removeAttribute('class'); + let ads = document.querySelectorAll('div[data-qa*="AdSlot"], div.adblock-message'); hideDOMElement(...ads); } } diff --git a/custom/manifest.json b/custom/manifest.json index 253df4b..203559f 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.4.2.4" + "version": "3.4.2.5" } diff --git a/manifest.json b/manifest.json index 1e32d1a..6053379 100644 --- a/manifest.json +++ b/manifest.json @@ -808,5 +808,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.4.2.4" + "version": "3.4.2.5" } diff --git a/sites.js b/sites.js index 2752efe..0639559 100644 --- a/sites.js +++ b/sites.js @@ -2001,6 +2001,7 @@ var defaultSites = { }, "South China Morning Post": { domain: "scmp.com", + allow_cookies: 1, block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ }, "Southern Weekly": { @@ -2871,4 +2872,4 @@ var de_rp_aachen_medien_nofix_domains = ['aachener-nachrichten.de', 'aachener-ze var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr']; var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'limesonline.com', 'repubblica.it']; var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; -var nofix_sites = ['aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asiatimes.com', 'autosport.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessgreen.com', 'businessinsider.de', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.de', 'handelsblatt.com', 'hbrchina.org', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'liberation.fr', 'limburger.nl', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.de', 'observador.pt', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'quillette.com', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'vosgesmatin.fr', 'weltwoche.ch', 'weltwoche.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_rp_aachen_medien_nofix_domains, fr_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains); +var nofix_sites = ['aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessgreen.com', 'businessinsider.de', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.de', 'handelsblatt.com', 'hbrchina.org', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'liberation.fr', 'limburger.nl', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.de', 'observador.pt', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'quillette.com', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'vosgesmatin.fr', 'weltwoche.ch', 'weltwoche.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_rp_aachen_medien_nofix_domains, fr_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json index 2c8a5cc..9fee63a 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -121,6 +121,13 @@ "ld_json_url": "div.entry-paywall-login|div.entry-main > div.entry__post-content", "upd_version": "3.4.0.7" }, + "South China Morning Post": { + "domain": "scmp.com", + "allow_cookies": 1, + "block_regex": "(\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js)", + "cs_code": "[{\"cond\":\"div.paywalled-content\", \"rm_attrib\":\"class\"}]", + "upd_version": "3.4.2.5" + }, "Süddeutsche Zeitung (link to archive.is)": { "domain": "sueddeutsche.de", "allow_cookies": 1,