From 4ba787f4cebbd421988c7381540ba6b8ba32aa94 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Thu, 2 Feb 2023 13:06:23 +0100 Subject: [PATCH] Remove DN.no (fix obsolete) --- README.md | 1 - background.js | 2 +- changelog.txt | 1 + contentScript.js | 36 ------------------------------------ manifest.json | 1 - sites.js | 6 +----- 6 files changed, 3 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index a5c375d..0add5ea 100644 --- a/README.md +++ b/README.md @@ -648,7 +648,6 @@ Grouped in options:\ [Leeuwarder Courant](https://www.lc.nl) ##### Norway -[DN](https://www.dn.no)\ Grouped in options:\ *NHST Media Group* sites like\ [Europower](https://www.europower-energi.no) - diff --git a/background.js b/background.js index 6a78fc5..530ddcf 100644 --- a/background.js +++ b/background.js @@ -12,7 +12,7 @@ if (typeof ext_api.action !== 'object') { ext_api.action = ext_api.browserAction; } -const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'dn.no', 'dvhn.nl', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lecourrierdesstrateges.fr', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'thebulletin.org', 'timesofindia.com', 'valor.globo.com', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains); +const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'belfasttelegraph.co.uk', 'bloomberg.com', 'cicero.de', 'dvhn.nl', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'inc42.com', 'independent.ie', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lecourrierdesstrateges.fr', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'sloanreview.mit.edu', 'stratfor.com', 'techinasia.com', 'thebulletin.org', 'timesofindia.com', 'valor.globo.com', 'vn.nl', 'zerohedge.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains); var optin_setcookie = false; var optin_update = true; var blocked_referer = false; diff --git a/changelog.txt b/changelog.txt index 585b361..43b006d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Remove DN.no (fix obsolete) Fix Conde Nast magazines (cookies) Fix DvhN.nl (json) Fix Madsack Mediengruppe diff --git a/contentScript.js b/contentScript.js index eeb7ce4..c6bdb1c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3051,42 +3051,6 @@ else if (matchDomain('discovermagazine.com')) { }, 1000); } -else if (matchDomain('dn.no')) { - let url = window.location.href; - let paywall = document.querySelector('div#dn-ncp-popup, div.paywall, iframe[title="Paywall"]'); - if (paywall) { - removeDOMElement(paywall); - let article_sel = 'article'; - let article = document.querySelector(article_sel); - if (article) { - let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0]; - replaceDomElementExt(url_cache, true, false, article_sel); - } else { - article = document.querySelector('main#main-story, main.lp_article_content'); - if (article) - article.firstChild.before(googleWebcacheLink(url)); - } - } - window.setTimeout(function () { - let preview = document.querySelector('html.dn-preview-page'); - if (preview) - preview.removeAttribute('class'); - let infobox_content = document.querySelector('div.infobox__content'); - if (infobox_content) - infobox_content.removeAttribute('class'); - let lazy_images = document.querySelectorAll('img[class*="lazy"][data-srcset]:not([src])'); - for (let elem of lazy_images) { - elem.src = elem.getAttribute('data-srcset').split(' ')[0]; - if (elem.classList.contains('lazy')) - elem.classList.remove('lazy'); - else - elem.removeAttribute('class'); - } - let ads = document.querySelectorAll('div[id^="googlead-"]'); - removeDOMElement(...ads); - }, 1000); -} - else if (matchDomain('economictimes.com')) { if (window.location.pathname.includes('/amp_')) { let paywall = document.querySelector('.paywall_wrap'); diff --git a/manifest.json b/manifest.json index cdc54a6..b7966f8 100644 --- a/manifest.json +++ b/manifest.json @@ -187,7 +187,6 @@ "*://*.diariovasco.com/*", "*://*.digiday.com/*", "*://*.discovermagazine.com/*", - "*://*.dn.no/*", "*://*.dna.fr/*", "*://*.dvhn.nl/*", "*://*.eastbaytimes.com/*", diff --git a/sites.js b/sites.js index e9b0fd4..d4c8b19 100644 --- a/sites.js +++ b/sites.js @@ -436,10 +436,6 @@ var defaultSites = { "Discover Magazine": { domain: "discovermagazine.com" }, - "DN.no": { - domain: "dn.no", - allow_cookies: 1 - }, "Domani": { domain: "editorialedomani.it", allow_cookies: 1, @@ -2440,4 +2436,4 @@ init_custom_flex_domains(); var au_news_corp_nofix_domains = ['cairnspost.com.au', 'geelongadvertiser.com.au', 'townsvillebulletin.com.au']; var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be']; var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com', 'repubblica.it']; -var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, it_gedi_nofix_domains); +var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'mondediplo.com', 'moneycontrol.com', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'nwzonline.de', 'ouest-france.fr', 'philonomist.com', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, it_gedi_nofix_domains);