mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-05-11 06:54:26 +02:00
Fix theglobeandmail.com
This commit is contained in:
parent
c12ea5014e
commit
317f07c906
@ -178,7 +178,6 @@ const blockedRegexes = {
|
|||||||
'spectator.com.au': /.+\.tinypass\.com\/.+/,
|
'spectator.com.au': /.+\.tinypass\.com\/.+/,
|
||||||
'telegraph.co.uk': /.+telegraph\.co\.uk.+martech.+/,
|
'telegraph.co.uk': /.+telegraph\.co\.uk.+martech.+/,
|
||||||
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
'thecourier.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
||||||
'theglobeandmail.com': /theglobeandmail\.com\/pb\/resources\/scripts\/build\/chunk-bootstraps\/.+\.js/,
|
|
||||||
'thenation.com': /thenation\.com\/.+\/paywall-script\.php/,
|
'thenation.com': /thenation\.com\/.+\/paywall-script\.php/,
|
||||||
'thewrap.com': /thewrap\.com\/.+\/wallkit\.js/,
|
'thewrap.com': /thewrap\.com\/.+\/wallkit\.js/,
|
||||||
'wsj.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/,
|
'wsj.com': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/,
|
||||||
|
@ -188,25 +188,21 @@ if (matchDomain('estadao.com.br')) {
|
|||||||
if (DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
if (DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
||||||
} else if (matchDomain('theglobeandmail.com')) {
|
} else if (matchDomain('theglobeandmail.com')) {
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const lazyImages = document.querySelectorAll('.js-lazyimage');
|
const subscribed = document.querySelector('html.story-subscribed');
|
||||||
for (const lazyImage of lazyImages) {
|
if (subscribed && !window.location.href.includes('?ref=premium')) {
|
||||||
lazyImage.classList.remove('js-lazyimage');
|
window.setTimeout(function () {
|
||||||
}
|
window.location.href = new URL(window.location.href).pathname + '?ref=premium';
|
||||||
const hiddenImages = document.querySelectorAll('img');
|
}, 100);
|
||||||
for (const hiddenImage of hiddenImages) {
|
|
||||||
const src = hiddenImage.src;
|
|
||||||
if (src.indexOf('data:image/gif') !== -1) {
|
|
||||||
const dataSrc = hiddenImage.getAttribute('data-src');
|
|
||||||
if (dataSrc) {
|
|
||||||
hiddenImage.setAttribute('src', dataSrc);
|
|
||||||
}
|
|
||||||
const dataBg = hiddenImage.getAttribute('data-bg');
|
|
||||||
if (dataBg) {
|
|
||||||
hiddenImage.setAttribute('src', dataBg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const cCards = document.querySelectorAll('div.c-card');
|
||||||
|
for (const cCard of cCards) {
|
||||||
|
const aLink = cCard.querySelector('a');
|
||||||
|
const key = cCard.querySelector('span.c-indicator-icon--key');
|
||||||
|
if (key && aLink && !aLink.href.includes('?ref=premium')) {
|
||||||
|
aLink.href = aLink.href + '?ref=premium';
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (matchDomain(['examiner.com.au', 'thecourier.com.au', 'theadvocate.com.au'])) {
|
} else if (matchDomain(['examiner.com.au', 'thecourier.com.au', 'theadvocate.com.au'])) {
|
||||||
const subscribeTruncate = document.querySelector('.subscribe-truncate');
|
const subscribeTruncate = document.querySelector('.subscribe-truncate');
|
||||||
if (subscribeTruncate) { subscribeTruncate.classList.remove('subscribe-truncate'); }
|
if (subscribeTruncate) { subscribeTruncate.classList.remove('subscribe-truncate'); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user