Fix Vogue Business (amp)

This commit is contained in:
magnolia1234 2022-04-18 19:42:16 +02:00
parent daa461e37f
commit 75987fd104
4 changed files with 25 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Fix ABC.es (mobile)
Fix Adweek (free articles only)
Fix Quartz (newsletter)
Fix The Athletic (Ink-layout)
Fix Vogue Business (amp)
Update block general paywall script (Ensighten)
Update block general paywall script (Evolok WordPress)

View File

@ -3665,6 +3665,19 @@ else if (matchDomain('venturebeat.com')) {
}, 500);
}
else if (matchDomain('voguebusiness.com')) {
if (window.location.pathname.endsWith('/amp')) {
amp_unhide_subscr_section();
} else {
let paywall = document.querySelector('div[class*="PaywallInlineBarrier"]');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (paywall && amphtml) {
removeDOMElement(paywall);
window.location.href = amphtml.href;
}
}
}
else if (matchDomain('washingtonpost.com')) {
let leaderboard = document.querySelector('#leaderboard-wrapper');
let adverts = document.querySelectorAll('div[data-qa$="-ad"]');

View File

@ -1846,7 +1846,8 @@ var defaultSites = {
"Vogue Business": {
allow_cookies: 1,
domain: "voguebusiness.com",
useragent: "googlebot"
useragent: "googlebot",
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(ad|subscriptions)-.+\.js/
},
"Volkskrant": {
domain: "volkskrant.nl",

View File

@ -30,5 +30,14 @@
"allow_cookies": 1,
"ld_json": "div.paywall|div#articleBody",
"new_site": 1
},
"Vogue Business": {
"allow_cookies": 1,
"domain": "voguebusiness.com",
"useragent": "googlebot",
"block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-(ad|subscriptions)-.+\\.js",
"amp_redirect": "div[class*=\"PaywallInlineBarrier\"]",
"amp_unhide": 1,
"new_site": 1
}
}