Fix NzHerald
This commit is contained in:
parent
4a4792289b
commit
3a42adff31
@ -11,6 +11,7 @@ Add RedaktionsNetzwerk Deutschland
|
||||
Fix Alma Talent sites (js-ads)
|
||||
Fix Australia News Corp (amp)
|
||||
Fix Madsack Mediengruppe
|
||||
Fix NzHerald
|
||||
|
||||
* v2.6.2.0 (2022-03-27)
|
||||
Add Badische Neueste Nachrichten
|
||||
|
@ -33,7 +33,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "cleaneatingmag.
|
||||
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 = ['abc.es', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'muensterschezeitung.de', 'nknews.org', 'nytimes.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'thehindu.com', 'thetimes.co.uk', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(de_funke_media_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_quotidiano_domains, no_nhst_media_domains, usa_hearst_comm_domains);
|
||||
var arr_localstorage_hold = ['abc.es', 'allgaeuer-zeitung.de', 'augsburger-allgemeine.de', 'barrons.com', 'businessoffashion.com', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'ilfoglio.it', 'inc42.com', 'kurier.at', 'lanouvellerepublique.fr', 'lesechos.fr', 'mid-day.com', 'muensterschezeitung.de', 'nknews.org', 'nytimes.com', 'nzherald.co.nz', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'thehindu.com', 'thetimes.co.uk', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(de_funke_media_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_quotidiano_domains, no_nhst_media_domains, usa_hearst_comm_domains);
|
||||
if (!matchDomain(arr_localstorage_hold)) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
@ -3023,10 +3023,13 @@ else if (matchDomain(['nola.com', 'theadvocate.com'])) {
|
||||
}
|
||||
|
||||
else if (matchDomain('nzherald.co.nz')) {
|
||||
// plus code in contentScript_once.js
|
||||
let article_content = document.querySelector('.article__content');
|
||||
if (article_content) {
|
||||
let article_offer = document.querySelector('.article-offer');
|
||||
if (article_offer && dompurify_loaded) {
|
||||
let premium = document.querySelector('span.ellipsis');
|
||||
if (premium && dompurify_loaded) {
|
||||
premium.classList.remove('ellipsis');
|
||||
let article_offer = document.querySelector('.article-offer');
|
||||
removeDOMElement(article_offer);
|
||||
let css_selector = article_content.querySelectorAll('p[style]')[1].getAttribute('class');
|
||||
let hidden_not_pars = article_content.querySelectorAll('.' + css_selector + ':not(p)');
|
||||
|
@ -61,6 +61,16 @@ else if (matchDomain('nyteknik.se')) {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
else if (matchDomain('nzherald.co.nz')) {
|
||||
function nzherald_main() {
|
||||
if (window.Fusion)
|
||||
window.Fusion.globalContent.isPremium = false;
|
||||
}
|
||||
window.setTimeout(function () {
|
||||
insert_script(nzherald_main);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
else if (matchDomain('gitlab.com')) {
|
||||
window.setTimeout(function () {
|
||||
let bio = document.querySelector('div.profile-user-bio');
|
||||
@ -120,4 +130,15 @@ function waitDOMElement(selector, tagName = '', callback, multiple = false) {
|
||||
subtree: true,
|
||||
childList: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function insert_script(func, insertAfterDom) {
|
||||
let bpc_script = document.querySelector('script#bpc_script');
|
||||
if (!bpc_script) {
|
||||
let script = document.createElement('script');
|
||||
script.setAttribute('id', 'bpc_script');
|
||||
script.appendChild(document.createTextNode('(' + func + ')();'));
|
||||
let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement);
|
||||
insertAfter.appendChild(script);
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
"*://*.inkl.com/*",
|
||||
"*://*.nationalgeographic.com/*",
|
||||
"*://*.nyteknik.se/*",
|
||||
"*://*.nzherald.co.nz/*",
|
||||
"*://*.gitlab.com/magnolia1234"
|
||||
],
|
||||
"run_at": "document_start",
|
||||
@ -41,5 +42,5 @@
|
||||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.6.2.5"
|
||||
"version": "2.6.2.6"
|
||||
}
|
||||
|
@ -30,6 +30,7 @@
|
||||
"*://*.inkl.com/*",
|
||||
"*://*.nationalgeographic.com/*",
|
||||
"*://*.nyteknik.se/*",
|
||||
"*://*.nzherald.co.nz/*",
|
||||
"*://*.gitlab.com/magnolia1234"
|
||||
],
|
||||
"run_at": "document_start",
|
||||
@ -657,5 +658,5 @@
|
||||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.6.2.5"
|
||||
"version": "2.6.2.6"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user