Add DN.no

This commit is contained in:
magnolia1234 2022-12-02 13:36:27 +01:00
parent 38bda7c911
commit f6ee454212
6 changed files with 77 additions and 18 deletions

View File

@ -642,6 +642,7 @@ 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) -

View File

@ -8,7 +8,7 @@ var navigator_ua = navigator.userAgent;
var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile');
var kiwi_browser = navigator_ua_mobile && (url_loc === 'chrome') && !navigator_ua.toLowerCase().includes('yabrowser');
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains);
const dompurify_sites = ['arcinfo.ch', 'asiatimes.com', 'bloomberg.com', 'cicero.de', 'dn.no', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lequipe.fr', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'newscientist.com', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(nl_mediahuis_region_domains, no_nhst_media_domains);
var optin_setcookie = false;
var optin_update = true;
var blocked_referer = false;

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add DN.no
Add Welt.de (link to archive.is)
Remove BusinessPost.ie (fix obsolete)
Remove Philonomist (fix obsolete)
@ -34,7 +35,7 @@ Add Philomag.com
Add Public.fr
Add Record.pt
Add The New York Post
Remove Dn.no (fix obsolete)
Remove DN.no (fix obsolete)
Remove GElocal.it & Huffintonpost.it (fix obsolete)
Remove Il Secolo XIX, La Stampa & Limes Online (fix obsolete)
Fix Cmjornal.pt

View File

@ -41,7 +41,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
// clean local storage of sites (with an exemption for hold-list)
var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains);
var arr_localstorage_hold = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'ksta.de', 'lanouvellerepublique.fr', 'latimes.com', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'nknews.org', 'nw.de', 'nytimes.com', 'nzherald.co.nz', 'nwzonline.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'substack.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(ca_gcm_domains, de_funke_medien_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, ca_gcm_domains, nl_dpg_media_domains, no_nhst_media_domains, usa_hearst_comm_domains);
if (!matchDomain(arr_localstorage_hold)) {
window.localStorage.clear();
}
@ -685,11 +685,11 @@ else if (matchDomain(['mz.de', 'volksstimme.de'])) {
}
}
else if (matchDomain(['noz.de', 'nwzonline.de', 'shz.de', 'svz.de'])) {
if (window.location.pathname.match(/(-amp\.html|\/amp)$/)) {
else if (matchDomain(['noz.de', 'shz.de', 'svz.de'])) {
if (window.location.pathname.endsWith('/amp')) {
amp_unhide_access_hide('="NOT data.reduced"', '="data.reduced"', 'amp-ad, amp-embed, .ads-wrapper, #flying-carpet-wrapper');
} else {
let paywall = document.querySelector('.paywall, .story--premium__container');
let paywall = document.querySelector('.paywall');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (paywall && amphtml) {
removeDOMElement(paywall);
@ -711,6 +711,19 @@ else if (matchDomain('nw.de')) {
}
}
else if (matchDomain('nwzonline.de')) {
if (window.location.pathname.match(/-amp\.html$/)) {
amp_unhide_access_hide('="NOT data.reduced"', '="data.reduced"', 'amp-ad, amp-embed');
} else {
let paywall = document.querySelector('.story--premium__container');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (paywall && amphtml) {
removeDOMElement(paywall);
window.location.href = amphtml.href;
}
}
}
else if (matchDomain('nzz.ch')) {
if (!window.location.href.includes('/amp/')) {
let ads = document.querySelectorAll('div.resor');
@ -2837,6 +2850,35 @@ 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);
csDoneOnce = true;
let article_sel = 'section.article-main-content';
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('article, main#main-story, main.lp_article_content');
if (article)
article.insertBefore(googleWebcacheLink(url), article.firstChild);
}
}
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 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');
@ -4422,21 +4464,31 @@ function ampToHtml() {
}
function archiveLink(url, text_fail = 'BPC > Full article text:\r\n') {
return externalLink(['archive.today', 'archive.is'], 'https://{domain}?run=1&url={url}', url, text_fail);
}
function googleWebcacheLink(url, text_fail = 'BPC > Full article text:\r\n') {
return externalLink(['webcache.googleusercontent.com'], 'https://{domain}/search?q=cache:{url}', url, text_fail);
}
function ext_12ftLink(url, text_fail = 'BPC > Full article text:\r\n') {
return externalLink(['12ft.io'], 'https://{domain}/{url}', url, text_fail);
}
function externalLink(domains, ext_url_templ, url, text_fail = 'BPC > Full article text:\r\n') {
let text_fail_div = document.createElement('div');
text_fail_div.id = 'bpc_archive';
text_fail_div.setAttribute('style', 'margin: 20px; font-weight: bold; color:red;');
text_fail_div.appendChild(document.createTextNode(text_fail));
function add_links(domains) {
for (let domain of domains) {
let a_link = document.createElement('a');
a_link.innerText = domain;
a_link.href = 'https://' + domain + '?run=1&url=' + url.split('?')[0];
a_link.target = '_blank';
text_fail_div.appendChild(document.createTextNode(' | '));
text_fail_div.appendChild(a_link);
}
for (let domain of domains) {
let ext_url = ext_url_templ.replace('{domain}', domain).replace('{url}', url.split('?')[0]);
let a_link = document.createElement('a');
a_link.innerText = domain;
a_link.href = ext_url;
a_link.target = '_blank';
text_fail_div.appendChild(document.createTextNode(' | '));
text_fail_div.appendChild(a_link);
}
add_links(['archive.today', 'archive.is']);
return text_fail_div;
}

View File

@ -184,6 +184,7 @@
"*://*.diariovasco.com/*",
"*://*.digiday.com/*",
"*://*.discovermagazine.com/*",
"*://*.dn.no/*",
"*://*.dna.fr/*",
"*://*.dvhn.nl/*",
"*://*.eastbaytimes.com/*",
@ -730,5 +731,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.5.2"
"version": "2.9.5.3"
}

View File

@ -405,6 +405,10 @@ var defaultSites = {
"Discover Magazine": {
domain: "discovermagazine.com"
},
"DN.no": {
domain: "dn.no",
allow_cookies: 1
},
"Domani": {
domain: "editorialedomani.it",
allow_cookies: 1,
@ -2390,4 +2394,4 @@ init_custom_domains();
// sites with no fix (background)
var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be'];
var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'lastampa.it', 'limesonline.com'];
var nofix_sites = ['africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'courrierinternational.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'handelsblatt.com', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'philonomist.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il', 'zerohedge.com'].concat(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', 'caravanmagazine.in', 'courrierinternational.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'ftchinese.com', 'handelsblatt.com', 'hs.fi', 'ilsole24ore.com', 'jacobinmag.com', 'jeuneafrique.com', 'kurier.at', 'lavie.fr', 'lavozdegalicia.es', 'leconomiste.com', 'lefigaro.fr', 'lemonde.fr', 'lepoint.fr', 'letemps.ch', 'liberation.fr', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mondediplo.com', 'moneycontrol.com', 'nature.com', 'nbr.co.nz', 'nn.de', 'ouest-france.fr', 'philonomist.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'sueddeutsche.de', 'suedkurier.de', 'swp.de', 'tagesanzeiger.ch', 'the-ken.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'weser-kurier.de', 'worldpoliticsreview.com', 'ynet.co.il', 'zerohedge.com'].concat(be_mediahuis_nofix_domains, it_gedi_nofix_domains);