From a8d6d511ff6485bb636015750659d66536961160 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 25 Jul 2023 07:21:11 +0200 Subject: [PATCH] Fix New Scientist (regwall) Maintenance updated sites (clear) --- background.js | 9 +++++++++ changelog.txt | 4 +++- custom/manifest.json | 2 +- manifest.json | 2 +- options/options.html | 3 ++- options/options.js | 8 +++++++- sites.js | 3 ++- sites_updated.json | 9 +++++---- 8 files changed, 30 insertions(+), 10 deletions(-) diff --git a/background.js b/background.js index 4745bf16..26963c6d 100644 --- a/background.js +++ b/background.js @@ -169,6 +169,12 @@ function check_sites_updated() { }); } +function clear_sites_updated() { + ext_api.storage.local.set({ + sites_updated: {} + }); +} + function prep_regex_str(str, domain = '') { if (domain) str = str.replace(/{domain}/g, domain.replace(/\./g, '\\.')); @@ -1375,6 +1381,9 @@ ext_api.runtime.onMessage.addListener(function (message, sender) { if (message.request === 'check_sites_updated') { check_sites_updated(); } + if (message.request === 'clear_sites_updated') { + clear_sites_updated(); + } if (message.request === 'popup_show_toggle') { ext_api.tabs.query({ active: true, diff --git a/changelog.txt b/changelog.txt index 05db2da7..a4ef4eb1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,8 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add Ruhr Nachrichten (+ Media Group Westfalen; opt-in to custom sites) +Fix New Scientist (regwall) +Maintenance updated sites (clear) * v3.2.6.0 (2023-07-23) Add Auto-motor-und-sport.de @@ -23,7 +25,7 @@ Fix Star Tribune (images/comments) Fix The Toronto Star (js) Fix Verlagsgruppe Rhein Main (json & identify sites) Maintenance request host permission (disabled for mobile) -Update custom sites (fix ld_google_webcache) +Update custom/updated sites (fix ld_google_webcache) * v3.2.5.0 (2023-07-16) Add El Tribuno (ar) diff --git a/custom/manifest.json b/custom/manifest.json index f260b741..077f38de 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.2.6.1" + "version": "3.2.6.2" } diff --git a/manifest.json b/manifest.json index dd5a1e5e..cb6f328c 100644 --- a/manifest.json +++ b/manifest.json @@ -769,5 +769,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.2.6.1" + "version": "3.2.6.2" } diff --git a/options/options.html b/options/options.html index d7ff2612..4b8c6cd1 100644 --- a/options/options.html +++ b/options/options.html @@ -17,8 +17,9 @@
- + +
diff --git a/options/options.js b/options/options.js index d2854c64..a7fa1f37 100644 --- a/options/options.js +++ b/options/options.js @@ -149,6 +149,11 @@ function check_sites_updated() { location.reload(); } +function clear_sites_updated() { + ext_api.runtime.sendMessage({request: 'clear_sites_updated'}); + location.reload(); +} + function compareKey(firstStr, secondStr) { return firstStr.toLowerCase().replace(/\s\(.*\)/, '') === secondStr.toLowerCase().replace(/\s\(.*\)/, ''); } @@ -158,4 +163,5 @@ document.getElementById('save').addEventListener('click', save_options); document.getElementById('select-all').addEventListener('click', selectAll); document.getElementById('select-none').addEventListener('click', selectNone); document.getElementById("button-close").addEventListener('click', closeButton); -document.getElementById('sites_updated').addEventListener('click', check_sites_updated); +document.getElementById('check_sites_updated').addEventListener('click', check_sites_updated); +document.getElementById('clear_sites_updated').addEventListener('click', clear_sites_updated); diff --git a/sites.js b/sites.js index 40e7fcf0..06d64e81 100644 --- a/sites.js +++ b/sites.js @@ -1516,6 +1516,7 @@ var defaultSites = { "New Scientist": { domain: "newscientist.com", allow_cookies: 1, + block_regex: /\.piano\.io\//, cs_dompurify: 1 }, "New York Magazine (+ Curbed, Grub Street, The Cut & Vulture)": { @@ -2619,4 +2620,4 @@ init_custom_flex_domains(); // sites with no fix (background) var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com', 'repubblica.it']; -var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftonbladet.se', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'lefigaro.fr', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'lopinion.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', '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', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains); +var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftonbladet.se', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessinsider.de', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'lefigaro.fr', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lepoint.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'lopinion.fr', 'mainpost.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'morningstar.com', 'nationaljournal.com', 'manager-magazin.de', 'mz.de', 'nature.com', 'nbr.co.nz', 'nn.de', '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', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'substack.com', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesspiegel.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'volksstimme.de', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(it_gedi_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json index 4ba05d66..7dd92132 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -109,11 +109,12 @@ "block_regex": "(\\.com\\/_assets\\/jam\\/journey-data\\.js|\\.ensighten\\.com\\/.+\\/Bootstrap\\.js)", "upd_version": "3.2.3.2" }, - "Hindu Tamil Thisai": { - "domain": "hindutamil.in", + "New Scientist": { + "domain": "newscientist.com", "allow_cookies": 1, - "amp_redirect": "div.premium-class-bt", - "new_site": 1 + "block_regex": "\\.piano\\.io", + "cs_dompurify": 1, + "upd_version": "3.2.6.2" }, "Nordwest Zeitung": { "domain": "nwzonline.de",