Fix The West Australian (regional; identify site)

merge-requests/13/head
magnolia1234 1 year ago
parent 67ac5ac21d
commit 95d2f76d62

@ -620,7 +620,7 @@ Grouped in options:\
[Financieele Dagblad](https://fd.nl) -
[Follow the Money](https://www.ftm.nl) -
[Groene Amsterdammer](https://www.groene.nl) -
[Het Laatste Nieuws (link to archive.is))](https://www.hln.be) -
[Het Laatste Nieuws (link to archive.is)](https://www.hln.be) -
[Knack](https://www.knack.be) -
[Krant van West-Vlaanderen](https://kw.be) -
[NRC Handelsblad](https://www.nrc.nl) -
@ -737,7 +737,7 @@ Grouped in options:\
[Griffith Review](https://www.griffithreview.com) -
[Intelligent Investor](https://www.intelligentinvestor.com.au) -
[New Zealand Herald](https://www.nzherald.co.nz) -
[Quillette](https://quillette.com) -
[Quillette (link to archive.is)](https://quillette.com) -
[The Saturday Paper](https://www.thesaturdaypaper.com.au) -
[The Spectator Australia](https://www.spectator.com.au) -
[The West Australian (+ regional/opt-in to custom sites)](https://thewest.com.au)

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix LesEchos.fr (json)
Fix McClatchy Group (amp-redirect)
Fix The West Australian (regional; identify site)
* v3.0.4.0 (2023-02-05)
Add Inside Higher Ed

@ -302,8 +302,7 @@ else {
}
} else {
// Australian Seven West Media
let swm_image = document.querySelector('img[src^="https://images.thewest.com.au"]');
if (matchDomain('thewest.com.au') || swm_image) {
if (matchDomain('thewest.com.au') || document.querySelector('li > a[href*=".sevenwestmedia.com.au"]')) {
window.setTimeout(function () {
let breach_screen = document.querySelector('div[data-testid*="BreachScreen"]');
if (breach_screen) {
@ -315,16 +314,19 @@ else {
break;
}
}
if (json_script) {
let json_text = json_script.innerHTML.split('window.PAGE_DATA =')[1].split('</script')[0];
if (json_script && json_script.text.includes('window.PAGE_DATA =')) {
let json_text = json_script.text.split('window.PAGE_DATA =')[1].split('</script')[0];
json_text = json_text.replace(/undefined/g, '"undefined"');
try {
let json_article = JSON.parse(json_text);
let json_pub;
for (let key in json_article)
if (json_article[key].data.result.resolution && json_article[key].data.result.resolution.publication) {
json_pub = json_article[key].data.result.resolution.publication;
for (let key in json_article) {
let json_resolution = json_article[key].data.result.resolution;
if (json_resolution && json_resolution.publication) {
json_pub = json_resolution.publication;
break;
}
}
let json_content = [];
let url_loaded;
if (json_pub) {
@ -408,13 +410,15 @@ else {
par_dom.setAttribute('style', 'margin: 20px;');
breach_screen.before(par_dom);
}
} catch (err) {
console.log(err);
}
}
removeDOMElement(breach_screen);
}
}, 1500);
let header_advert = document.querySelector('.headerAdvertisement');
if (header_advert)
header_advert.setAttribute('style', 'display: none;');
hideDOMElement(header_advert);
}
}
}

@ -43,7 +43,7 @@ window.setTimeout(function () {
if (document.querySelector('a[href*="/australiancommunitymedia.zendesk.com/"]'))
group = '###_au_comm_media';
else if (hostname.endsWith('.com.au')) {
if (document.querySelector('link[href*="/thewest.com.au/"]'))
if (document.querySelector('li > a[href*=".sevenwestmedia.com.au"]'))
group = 'thewest.com.au';
}
} else if (hostname.endsWith('.cl')) {

@ -730,5 +730,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.0.4.2"
"version": "3.0.4.3"
}

Loading…
Cancel
Save