Fix Sueddeutsche Zeitung

Fix Independent.co.uk
This commit is contained in:
magnolia1234 2023-12-29 17:59:00 +01:00
parent 528f8c6d7b
commit ba6d45e0df
7 changed files with 48 additions and 30 deletions

View file

@ -163,8 +163,7 @@ function setDefaultOptions() {
}); });
} }
function check_sites_updated() { function check_sites_updated(sites_updated_json) {
let sites_updated_json = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean/-/raw/master/sites_updated.json';
fetch(sites_updated_json) fetch(sites_updated_json)
.then(response => { .then(response => {
if (response.ok) { if (response.ok) {
@ -184,6 +183,10 @@ function check_sites_updated() {
}); });
} }
var ext_path = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean/-/raw/master/';
var sites_updated_json = 'sites_updated.json';
var sites_updated_json_online = ext_path + sites_updated_json;
function clear_sites_updated() { function clear_sites_updated() {
ext_api.storage.local.set({ ext_api.storage.local.set({
sites_updated: {} sites_updated: {}
@ -518,9 +521,10 @@ ext_api.storage.local.get({
add_grouped_enabled_domains(grouped_sites); add_grouped_enabled_domains(grouped_sites);
set_rules(sites, updatedSites, customSites); set_rules(sites, updatedSites, customSites);
if (enabledSites.includes('#options_optin_update_rules')) { if (enabledSites.includes('#options_optin_update_rules')) {
check_sites_updated(); sites_updated_json = sites_updated_json_online;
sites_custom_ext_json = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean/-/raw/master/custom/sites_custom.json'; sites_custom_ext_json = ext_path + 'custom/sites_custom.json';
} }
check_sites_updated(sites_updated_json);
check_sites_custom_ext(); check_sites_custom_ext();
if (optin_update) if (optin_update)
check_update(); check_update();
@ -1456,7 +1460,7 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
site_switch(); site_switch();
} }
if (message.request === 'check_sites_updated') { if (message.request === 'check_sites_updated') {
check_sites_updated(); check_sites_updated(sites_updated_json_online);
} }
if (message.request === 'clear_sites_updated') { if (message.request === 'clear_sites_updated') {
clear_sites_updated(); clear_sites_updated();

View file

@ -9,7 +9,9 @@ Add Huffingtonpost.it
Remove Haaretz Group (fix obsolete) Remove Haaretz Group (fix obsolete)
Fix elDiario.es (amp-redirect) Fix elDiario.es (amp-redirect)
Fix Inc42 (css) Fix Inc42 (css)
Fix Independent.co.uk (fetch from archive.is)
Fix S&P Global (js-inline) Fix S&P Global (js-inline)
Fix Sueddeutsche Zeitung (fetch from archive.is)
Fix The Juggernaut Fix The Juggernaut
Update block general paywall script (Leaky-js-cookie) Update block general paywall script (Leaky-js-cookie)
@ -1265,7 +1267,7 @@ Add Capital Gazette (local USA)
Add Groupe Nice-Matin (France) Add Groupe Nice-Matin (France)
Add Il Foglio (Italy) Add Il Foglio (Italy)
Add Science (free articles only) Add Science (free articles only)
Add The Independent (UK - archive.today for premium) Add Independent.co.uk (archive.is for premium)
Fix group Tribune Publishing Company (js) Fix group Tribune Publishing Company (js)
Fix The New Statesman (Evolok) Fix The New Statesman (Evolok)
Update popup (permission to clear cookies) Update popup (permission to clear cookies)
@ -2079,7 +2081,7 @@ Fix WSJ (amp for pro/login)
* v1.7.5.0 (2020-06-14) * v1.7.5.0 (2020-06-14)
Add BBC History Extra Add BBC History Extra
Add Discover Magazine Add Discover Magazine
Add Irish Independent Add Independent.ie
Add Republic.ru Add Republic.ru
Fix Telegraph.co.uk (cookies) Fix Telegraph.co.uk (cookies)
Fix The Globe and Mail (cleanup) Fix The Globe and Mail (cleanup)

View file

@ -1244,18 +1244,24 @@ else if (matchDomain(['stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de']) |
else if (matchDomain('sueddeutsche.de')) { else if (matchDomain('sueddeutsche.de')) {
let url = window.location.href; let url = window.location.href;
let paywall = document.querySelector('div#sz-paywall'); let paywall;
if (paywall) { if (window.location.pathname.startsWith('/projekte/artikel/')) {
removeDOMElement(paywall); paywall = document.querySelector('div.offer-page');
let article = document.querySelector('div.article-content, div.text'); if (paywall && dompurify_loaded) {
if (article) removeDOMElement(paywall);
article.firstChild.before(archiveLink(url)); getArchive(url, 'main');
let reduced = document.querySelector('p.sz-article-body__paragraph--reduced'); }
if (reduced) } else {
reduced.classList.remove('sz-article-body__paragraph--reduced'); paywall = document.querySelector('p.sz-article-body__paragraph--reduced');
let ads = document.querySelectorAll('div.ad-container'); if (paywall && dompurify_loaded) {
hideDOMElement(...ads); paywall.removeAttribute('class');
getArchive(url, 'div[itemprop="articleBody"]');
}
} }
window.setTimeout(function () {
let ads = document.querySelectorAll('div.ad-container, er-ad-slot');
hideDOMElement(...ads);
}, 1500);
} }
else if (matchDomain('tagesspiegel.de')) { else if (matchDomain('tagesspiegel.de')) {
@ -2934,12 +2940,10 @@ else if (matchDomain('independent.co.uk')) {
} else { } else {
let paywall = document.querySelector('div.article-premium'); let paywall = document.querySelector('div.article-premium');
let related = document.querySelector('div.related'); let related = document.querySelector('div.related');
let msg = document.querySelector('div#bpc_archive'); if (paywall && !related && dompurify_loaded) {
if (paywall && !related && !msg) {
paywall.classList.remove('article-premium'); paywall.classList.remove('article-premium');
let article = document.querySelector('div#main'); csDoneOnce = true;
if (article) getArchive(url, 'div#main');
article.firstChild.before(archiveLink(url));
} }
} }
} }

View file

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.4.8.6" "version": "3.4.8.7"
} }

View file

@ -1,6 +1,6 @@
{ {
"###_remove_sites": { "###_remove_sites": {
"cs_code": "al-monitor.com, arkansasonline.com, bild.de, doorbraak.be, gp.se, handelsblatt.com, interestingengineering.com, lastampa.it, politiken.dk, repubblica.it, rp-online.de, sueddeutsche.de, theepochtimes.com, theinformation.com, thestage.co.uk", "cs_code": "al-monitor.com, arkansasonline.com, bild.de, doorbraak.be, gp.se, handelsblatt.com, interestingengineering.com, lastampa.it, politiken.dk, repubblica.it, rp-online.de, sueddeutsche.de, theepochtimes.com, theinformation.com",
"domain": "###" "domain": "###"
}, },
"Abajournal.com": { "Abajournal.com": {
@ -705,6 +705,12 @@
"block_regex": "\\.tinypass\\.com", "block_regex": "\\.tinypass\\.com",
"domain": "thenational.scot" "domain": "thenational.scot"
}, },
"Thestage.co.uk": {
"add_ext_link": "div#ao-MeteringDNAllow|div[class*='-Teaser']",
"add_ext_link_type": "archive.is",
"allow_cookies": 1,
"domain": "thestage.co.uk"
},
"Tijorifinance.com": { "Tijorifinance.com": {
"allow_cookies": 1, "allow_cookies": 1,
"domain": "tijorifinance.com", "domain": "tijorifinance.com",

View file

@ -824,5 +824,5 @@
"*://archive.vn/*", "*://archive.vn/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.4.8.6" "version": "3.4.8.7"
} }

View file

@ -2105,7 +2105,8 @@ var defaultSites = {
"Süddeutsche Zeitung (link to archive.is)": { "Süddeutsche Zeitung (link to archive.is)": {
domain: "sueddeutsche.de", domain: "sueddeutsche.de",
allow_cookies: 1, allow_cookies: 1,
block_regex: /\.sueddeutsche\.de\/api\/tinypass\.min\.js/ block_regex: /\.sueddeutsche\.de\/api\/tinypass\.min\.js/,
cs_dompurify: 1
}, },
"Swarajyamag": { "Swarajyamag": {
domain: "swarajyamag.com", domain: "swarajyamag.com",
@ -2322,7 +2323,8 @@ var defaultSites = {
"The Independent": { "The Independent": {
domain: "independent.co.uk", domain: "independent.co.uk",
allow_cookies: 1, allow_cookies: 1,
block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/,
cs_dompurify: 1
}, },
"The Indian Express": { "The Indian Express": {
domain: "indianexpress.com", domain: "indianexpress.com",
@ -2932,4 +2934,4 @@ var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr'
var il_haaretz_group_nofix_domains = ['haaretz.co.il', 'haaretz.com', 'themarker.com']; var il_haaretz_group_nofix_domains = ['haaretz.co.il', 'haaretz.com', 'themarker.com'];
var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com']; var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com'];
var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; 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', 'asahi.com', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bloomberglaw.com', 'bloombergtax.com', 'bnn.de', 'borsen.dk', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'handelsblatt.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'jungefreiheit.de', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.de', 'nwzonline.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', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'streetinsider.com', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, il_haaretz_group_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains); var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asahi.com', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bloomberglaw.com', 'bloombergtax.com', 'bnn.de', 'borsen.dk', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'handelsblatt.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'jungefreiheit.de', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.de', 'nwzonline.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', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'streetinsider.com', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, il_haaretz_group_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);