Fix Quotidiano.net (no amp)

This commit is contained in:
magnolia1234 2022-12-03 08:24:16 +01:00
parent 317c8f5e6e
commit 2e3b9c5e46
2 changed files with 4 additions and 1 deletions

View file

@ -9,6 +9,7 @@ Remove BusinessPost.ie (fix obsolete)
Remove Philonomist (fix obsolete)
Fix Australian Community Media (identify on url)
Fix Groupe Centre France (text)
Fix Quotidiano.net (no amp)
Fix The Chronicle of Higher Education (css)
* v2.9.5.0 (2022-11-27)

View file

@ -1855,10 +1855,12 @@ else if (matchDomain(it_ilmessaggero_domains)) {
else if (matchDomain(it_quotidiano_domains)) {
if (window.location.pathname.endsWith('/amp')) {
amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"', 'amp-ad, amp-fx-flying-carpet');
amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"', 'amp-ad, amp-embed, amp-fx-flying-carpet, .watermark-adv');
} else {
let paywall = document.querySelector('div[data-testid="paywall-container"]');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (!amphtml)
amphtml = {href: window.location.pathname + '/amp'};
if (paywall && amphtml) {
removeDOMElement(paywall);
window.location.href = amphtml.href;