mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 01:24:26 +02:00
Fix theglobeandmail.com
This commit is contained in:
parent
533a058d7b
commit
7e9c054e93
@ -218,6 +218,26 @@ if (matchDomain('elmercurio.com')) {
|
|||||||
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 realArticle = document.querySelector('.js-c-article-body');
|
||||||
|
let decoyArticle = document.querySelector('.decoy-article');
|
||||||
|
if (realArticle && !decoyArticle) {
|
||||||
|
decoyArticle = document.createElement('div');
|
||||||
|
decoyArticle.classList.add('js-c-article-body');
|
||||||
|
decoyArticle.classList.add('decoy-article');
|
||||||
|
decoyArticle.hidden = true;
|
||||||
|
realArticle.parentElement.insertBefore(decoyArticle, realArticle);
|
||||||
|
for(var child=realArticle.firstChild; child !== null; child=child.nextSibling) {
|
||||||
|
if (child.style) {
|
||||||
|
child.style.display = "block";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const regWall = document.querySelector('#regwall');
|
||||||
|
const lightBox = document.querySelector('.c-lightbox');
|
||||||
|
if (regWall && lightBox) {
|
||||||
|
regWall.hidden = true;
|
||||||
|
lightBox.hidden = true;
|
||||||
|
}
|
||||||
const subscribed = document.querySelector('html.story-subscribed');
|
const subscribed = document.querySelector('html.story-subscribed');
|
||||||
if (subscribed && !window.location.href.includes('?ref=premium')) {
|
if (subscribed && !window.location.href.includes('?ref=premium')) {
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user