Fix The West Australian (timing)

This commit is contained in:
magnolia1234 2023-12-02 17:23:58 +01:00
parent 087b1935e1
commit a7e0b36800
5 changed files with 37 additions and 32 deletions

View file

@ -11,6 +11,7 @@ Fix Freitag.de (text-break)
Fix La Segunda
Fix LeParisien.fr (amp-redirect)
Fix NzHerald (xhr)
Fix The West Australian (timing)
* v3.4.4.0 (2023-11-26)
Add Freitag.de

View file

@ -449,21 +449,19 @@ else {
} else {
// Australian Seven West Media
if (matchDomain('thewest.com.au') || document.querySelector('li > a[href*=".sevenwestmedia.com.au"]')) {
window.setTimeout(function () {
let breach_screen = document.querySelector('div.paywall div[data-testid*="BreachScreen"], div[class*="StyledBreachWallContent"]');
if (breach_screen) {
let scripts = document.querySelectorAll('script:not([src]):not([type])');
let json_script;
for (let script of scripts) {
if (script.text.includes('window.PAGE_DATA =')) {
json_script = script;
break;
}
function thewest_main(node) {
let scripts = document.querySelectorAll('script:not([src]):not([type])');
let json_script;
for (let script of scripts) {
if (script.text.includes('window.PAGE_DATA =')) {
json_script = script;
break;
}
if (json_script) {
let json_text = json_script.text.split('window.PAGE_DATA =')[1].split('</script')[0];
json_text = json_text.replace(/:undefined([,}])/g, ':"undefined"$1');
try {
}
if (json_script) {
let json_text = json_script.text.split('window.PAGE_DATA =')[1].split('</script')[0];
json_text = json_text.replace(/:undefined([,}])/g, ':"undefined"$1');
try {
let json_article = JSON.parse(json_text);
let json_pub;
for (let key in json_article) {
@ -566,22 +564,29 @@ else {
content.appendChild(par_dom);
} else {
par_dom.setAttribute('style', 'margin: 20px;');
breach_screen.before(par_dom);
}
} catch (err) {
console.log(err);
node.before(par_dom);
}
} catch (err) {
console.log(err);
}
removeDOMElement(breach_screen);
}
}, 2000);
let header_advert = document.querySelector('.headerAdvertisement');
removeDOMElement(node);
}
let paywall_sel = 'div.paywall div[data-testid*="BreachScreen"], div[class*="StyledBreachWallContent"]';
let paywall = document.querySelector(paywall_sel);
if (paywall)
thewest_main(paywall);
else {
csDoneOnce = true;
waitDOMElement(paywall_sel, 'DIV', thewest_main, false);
}
let header_advert = document.querySelector('div.headerAdvertisement');
hideDOMElement(header_advert);
}
} else
csDone = true;
}
}
else
csDone = true;
} else
csDone = true;
}
} else if (window.location.hostname.match(/\.(de|at|ch)$/) || matchDomain(['faz.net', 'topagrar.com', 'tt.com', 'wochenblatt.com'])) {//germany/austria/switzerland - ch
@ -1795,12 +1800,11 @@ else if (matchDomain('humanite.fr')) {
}
else if (matchDomain('journaldunet.com')) {
let reg_wall = document.querySelector('.reg_wall');
let reg_wall = document.querySelector('div.reg_wall');
removeDOMElement(reg_wall);
let entry_reg_wall = document.querySelector('.entry_reg_wall');
if (entry_reg_wall) {
let entry_reg_wall = document.querySelector('div.entry_reg_wall[style]');
if (entry_reg_wall)
entry_reg_wall.removeAttribute('style');
}
}
else if (matchDomain('la-croix.com')) {

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.4.5"
"version": "3.4.4.6"
}

View file

@ -824,5 +824,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.4.4.5"
"version": "3.4.4.6"
}

View file

@ -2911,4 +2911,4 @@ var de_rp_aachen_medien_nofix_domains = ['aachener-nachrichten.de', 'aachener-ze
var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr'];
var it_gedi_nofix_domains = ['gelocal.it', 'huffingtonpost.it', 'limesonline.com'];
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', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessgreen.com', 'businessinsider.de', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'diepresse.com', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'gamestar.de', 'geo.de', 'golem.de', 'handelsblatt.com', 'hbrchina.org', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'liberation.fr', 'limburger.nl', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.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', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'vosgesmatin.fr', 'weltwoche.ch', 'weltwoche.de', 'weser-kurier.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_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);
var nofix_sites = ['aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asahi.com', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bild.de', 'bloomberglaw.com', 'bloombergtax.com', 'borsen.dk', 'businessgreen.com', 'businessinsider.de', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'diepresse.com', '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', 'handelsblatt.com', 'hbrchina.org', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'liberation.fr', 'limburger.nl', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newslaundry.com', 'nn.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', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'vosgesmatin.fr', 'weltwoche.ch', 'weltwoche.de', 'weser-kurier.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_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);