Fix The Spectator UK (amp-redirect)

merge-requests/7/head
magnolia1234 2 years ago
parent 8e5d62a16c
commit 37fe4caa77

@ -10,6 +10,7 @@ Add Podium Runner
Add Rock and Ice
Fix El Pais (amp/video)
Fix Fortune (magazine)
Fix The Spectator UK (amp-redirect)
* v2.6.5.0 (2022-04-18)
Add Aftonbladet.se

@ -2035,16 +2035,19 @@ else if (matchDomain('prospectmagazine.co.uk')) {
}
else if (matchDomain('spectator.co.uk')) {
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';
if (window.location.pathname.match(/\/amp(\/)?$/)) {
let banners = document.querySelectorAll('div[amp-access^="p.show"], div[amp-access*="NOT loggedIn"]');
removeDOMElement(...banners);
} else if (window.location.pathname.startsWith('/article/')) {
let paywall = document.querySelector('.HardPayWallContainer-module__overlay');
let body_par = document.querySelector('p[class^="ContentPageBodyParagraph"]');
let amphtml = document.querySelector('link[rel="amphtml"]');
if ((paywall || !body_par) && amphtml) {
removeDOMElement(paywall);
window.setTimeout(function () {
window.location.href = amphtml.href;
}, 500);
}
}
}

@ -672,5 +672,5 @@
"*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.6.5.3"
"version": "2.6.5.4"
}

@ -16,11 +16,6 @@
"allow_cookies": 1,
"block_regex": "\\.amazonaws\\.com\\/s3fs-public\\/js\\/js_.+\\.js"
},
"Berliner Zeitung": {
"domain": "berliner-zeitung.de",
"allow_cookies": 1,
"block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-(ad|fx-flying-carpet|subscriptions)-.+\\.js"
},
"Better Nutrition": {
"domain": "betternutrition.com",
"group_rule": "###_gr_usa_outside_mag_domains"
@ -39,10 +34,6 @@
"domain": "investorschronicle.co.uk",
"referer": "google"
},
"Nürnberger Nachrichten": {
"domain": "nn.de",
"block_regex": "(cdn\\.cxense\\.com\\/|\\.piano\\.io\\/)"
},
"Outlook India": {
"domain": "outlookindia.com",
"allow_cookies": 1,

Loading…
Cancel
Save