mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-02 16:24:27 +02:00
Fix lastampa.it
This commit is contained in:
parent
4052a3203c
commit
a521b432d6
@ -596,6 +596,32 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
} else if (matchDomain('speld.nl')) {
|
} else if (matchDomain('speld.nl')) {
|
||||||
const paywallPopup = document.querySelector('.c-paywall-notice');
|
const paywallPopup = document.querySelector('.c-paywall-notice');
|
||||||
removeDOMElement(paywallPopup);
|
removeDOMElement(paywallPopup);
|
||||||
|
} else if (matchDomain('lastampa.it')) {
|
||||||
|
const url = window.location.href;
|
||||||
|
if (!url.includes('/amp/')) {
|
||||||
|
const premium = document.querySelector('.paywall-adagio');
|
||||||
|
removeDOMElement(premium);
|
||||||
|
window.setTimeout(function () {
|
||||||
|
if (premium) {
|
||||||
|
window.location.href = url.split('?')[0] + '/amp/';
|
||||||
|
}
|
||||||
|
const articleBody = document.querySelector('div#article-body[style]');
|
||||||
|
if (articleBody) {
|
||||||
|
articleBody.removeAttribute('style');
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
} else {
|
||||||
|
const paywall = document.querySelector('div[id^="paywall-banner"]');
|
||||||
|
removeDOMElement(paywall);
|
||||||
|
const subscriptionSection = document.querySelector('[subscriptions-section="content"]');
|
||||||
|
if (subscriptionSection) {
|
||||||
|
subscriptionSection.removeAttribute('subscriptions-section');
|
||||||
|
const preview = document.querySelector('div[subscriptions-section="content-not-granted"]');
|
||||||
|
removeDOMElement(preview);
|
||||||
|
}
|
||||||
|
const ampAds = document.querySelectorAll('amp-ad, amp-embed');
|
||||||
|
removeDOMElement(...ampAds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchDomain (domains) {
|
function matchDomain (domains) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user