Fix-update The Spectator UK (amp)

This commit is contained in:
magnolia1234 2021-06-15 21:24:05 +02:00
parent 674c1b4f48
commit 4b1b7cefb5
3 changed files with 14 additions and 9 deletions

View file

@ -3,12 +3,13 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix-update Boston Globe (no opt-in)
Fix-update The Spectator UK (amp)
* v2.2.5.0 (2021-06-13)
Add The Wrap
Fix-update Atlantico.fr
Fix-update Folha de S. Paulo (add blogs)
Fix-update La Stampa
Fix-update La Stampa (amp)
Fix-update Los Angeles Times (overlay)
Fix-update Medium/Towards Data Science (multimedia)
Fix-update TheTimes.co.uk (link to archive.is)

View file

@ -1398,13 +1398,17 @@ else if (matchDomain('prospectmagazine.co.uk')) {
}
else if (matchDomain('spectator.co.uk')) {
let premium = document.querySelector('.HardPayWallContainer-module__overlay');
removeDOMElement(premium);
window.setTimeout(function () {
if (premium && window.location.href.includes('/www.spectator.co.uk/')) {
window.location.href = window.location.href + '/amp';
}
}, 500); // Delay (in milliseconds)
let url = window.location.href.split('?')[0];
if (url.match(/\/amp(\/)?$/)) {
let paywall = document.querySelectorAll('div[amp-access^="p.show"');
let not_logged_in = document.querySelector('div[amp-access*="NOT loggedIn"]');
removeDOMElement(...paywall, not_logged_in)
} else {
let premium = document.querySelector('.HardPayWallContainer-module__overlay');
removeDOMElement(premium);
if (premium)
window.location.href = url + '/amp';
}
}
else if (matchDomain('telegraph.co.uk')) {

View file

@ -526,5 +526,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.2.5.1"
"version": "2.2.5.2"
}