Fix The West Australian (json)

merge-requests/14/head
magnolia1234 1 year ago
parent dda8dde350
commit ba60101995

@ -26,6 +26,7 @@ var restrictions = {
'elmercurio.com': /^((?!\.elmercurio\.com\/inversiones\/).)*$/,
'espn.com': /^((?!espn\.com\/watch).)*$/,
'esquire.com': /^((?!\/classic\.esquire\.com\/).)*$/,
'foreignaffairs.com': /^((?!\/reader\.foreignaffairs\.com\/).)*$/,
'hilltimes.com': /^((?!hilltimes\.com\/slideshow\/).)*$/,
'nknews.org': /^((?!nknews\.org\/pro\/).)*$/,
'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/,

@ -8,6 +8,7 @@ Remove Griffith Review (fix obsolete)
Fix Gannett Group (identify sites)
Fix LesEchos.fr (json)
Fix Nautil.us (cookies)
Fix The West Australian (json)
* v3.1.2.0 (2023-04-02)
Add Epicurious (Conde Nast)

@ -342,7 +342,7 @@ else {
}
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"');
json_text = json_text.replace(/:undefined([,}])/g, ':"undefined"$1');
try {
let json_article = JSON.parse(json_text);
let json_pub;
@ -3301,11 +3301,8 @@ else if (matchDomain('financialexpress.com')) {
if (paywall)
paywall.classList.remove('paywall');
let register = document.querySelector('div.pcl-wrap');
let ads;
if (window.location.pathname.endsWith('/lite/'))
ads = document.querySelectorAll('amp-ad, amp-embed, .ad-bg-container');
else
ads = document.querySelectorAll('div[class*="-ads-blocks-ad-unit"]');
let ads_selector = window.location.pathname.endsWith('/lite/') ? 'amp-ad, amp-embed, .ad-bg-container' : 'div[class*="-ads-blocks-ad-unit"]';
let ads = document.querySelectorAll(ads_selector);
removeDOMElement(register, ...ads);
}
@ -3323,23 +3320,6 @@ else if (matchDomain('foreignaffairs.com')) {
let article_dropcap = document.querySelectorAll('.article-dropcap');
for (let elem of article_dropcap)
elem.classList.add('loaded');
let hidden_images = document.querySelectorAll('img[src^="data:image/"][data-src]');
for (let hidden_image of hidden_images) {
hidden_image.setAttribute('src', hidden_image.getAttribute('data-src'));
hidden_image.removeAttribute('class');
}
let img_list = document.querySelectorAll('.magazine-list-article img');
for (let img_elem of img_list)
img_elem.setAttribute('class', 'mb-4');
if (window.location.href.includes('/interviews/')) {
let img_header = document.querySelector('.interview-header > div');
if (img_header) {
let img_src = img_header.getAttribute('data-src');
let img_elem = document.createElement('img');
img_elem.src = img_src;
img_header.appendChild(img_elem);
}
}
}, 1000);
}
@ -4447,8 +4427,7 @@ else if (matchDomain('thenewatlantis.com')) {
else if (matchDomain('thepointmag.com')) {
let overlay = document.querySelectorAll('div.overlay, div#tpopup-');
for (let elem of overlay)
removeDOMElement(elem);
removeDOMElement(...overlay);
}
else if (matchDomain('thequint.com')) {

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.1.2.3"
"version": "3.1.2.4"
}

@ -747,5 +747,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.1.2.3"
"version": "3.1.2.4"
}

@ -2491,4 +2491,4 @@ var au_news_corp_nofix_domains = ['cairnspost.com.au', 'geelongadvertiser.com.au
var be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be'];
var de_rp_medien_nofix_domains = ['ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de'];
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', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'business-standard.com', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'golem.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lemonde.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.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', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'rheinpfalz.de', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'thedispatch.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, de_rp_medien_nofix_domains, it_gedi_nofix_domains);
var nofix_sites = ['aamulehti.fi', 'africaintelligence.com', 'africaintelligence.fr', 'aftenposten.no', 'asiatimes.com', 'badische-zeitung.de', 'bild.de', 'borsen.dk', 'business-standard.com', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'courrierinternational.com', 'diepresse.com', 'dn.se', 'elordenmundial.com', 'epw.in', 'expresso.pt', 'finance.si', 'ftchinese.com', 'gamestar.de', 'golem.de', 'handelsblatt.com', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'investors.com', 'iltalehti.fi', 'jacobinmag.com', 'jeuneafrique.com', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lemonde.fr', 'lequipe.fr', 'letemps.ch', 'liberation.fr', 'lopinion.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', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'republic.ru', 'rheinpfalz.de', 'rnz.de', 'ruhrnachrichten.de', 'saechsische.de', 'schwarzwaelder-bote.de', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'substack.com', 'suedkurier.de', 'swp.de', 'techcrunch.com', 'the-ken.com', 'thedispatch.com', 'theinformation.com', 'themorningcontext.com', 'theparisreview.org', 'thewirechina.com', 'welt.de', 'weser-kurier.de', 'wiwo.de', 'worldpoliticsreview.com', 'ynet.co.il'].concat(au_news_corp_nofix_domains, be_mediahuis_nofix_domains, de_rp_medien_nofix_domains, it_gedi_nofix_domains);

Loading…
Cancel
Save