Fix The Globe and Mail (js only)

merge-requests/20/head
magnolia1234 2 months ago
parent 7944eb62b1
commit a544317df8

@ -964,7 +964,7 @@ if (typeof browser !== 'object') {
}
}
var set_var_sites = ['dagsavisen.no', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains);
var set_var_sites = ['dagsavisen.no', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz'].concat(de_madsack_domains);
function runOnTab_once_var(tab) {
let tabId = tab.id;
let url = tab.url;

@ -11,6 +11,7 @@ Fix ElMundo.es (colegios - no amp-fix)
Fix Hearst newspapers (anti-adblocker)
Fix Il Sole 24 Ore (24+ only)
Fix Motor Presse Stuttgart (xhr)
Fix The Globe and Mail (js only)
Fix The Quint (css)
* v3.5.8.0 (2024-03-03)

@ -5301,25 +5301,11 @@ else if (matchDomain('thediplomat.com')) {
}
else if (matchDomain('theglobeandmail.com')) {
if (!window.location.search.startsWith('?rel=premium')) {
let paywall = document.querySelector('div.c-paywall');
if (paywall) {
removeDOMElement(paywall);
window.location.href = window.location.pathname + '?rel=premium';
}
} else {
let html_nojs = document.querySelector('html.no-js');
if (html_nojs)
html_nojs.classList.remove('no-js');
let header_hidden = document.querySelectorAll('div.o-primary-header, div.c-article-meta');
for (let elem of header_hidden)
elem.setAttribute('style', 'display: block !important;');
}
let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-src]');
for (let elem of lazy_images)
elem.src = elem.getAttribute('data-src');
let banners = document.querySelectorAll('div.c-ad, div#subscription-pencil-area, div.marketing-container-wrapper, div[class^="BaseAd__"]');
hideDOMElement(...banners);
let ads = document.querySelectorAll('div.c-ad, div[class^="BaseAd__"], div.ad-container');
hideDOMElement(...ads);
}
else if (matchDomain(['thehindu.com', 'thehindubusinessline.com'])) {

@ -57,19 +57,6 @@ else if (matchDomain('nzherald.co.nz')) {
insert_script(nzherald_main);
}
else if (matchDomain('theglobeandmail.com')) {
function tgam_main() {
for (let n = 0; n < 10; n++) {
window.setTimeout(function () {
if (window.Fusion) {
window.Fusion.globalContent._id = '';
}
}, n * 50);
}
}
insert_script(tgam_main);
}
function matchDomain(domains, hostname) {
var matched_domain = false;
if (!hostname)

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.8.6"
"version": "3.5.8.7"
}

@ -853,5 +853,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.8.6"
"version": "3.5.8.7"
}

@ -2415,8 +2415,8 @@ var defaultSites = {
},
"The Globe and Mail": {
domain: "theglobeandmail.com",
block_js_inline: /\.theglobeandmail\.com\/.+\/article-.+\?rel=premium/,
block_regex: /(smartwall\.theglobeandmail\.com\/|\.sophi\.io\/|\.zephr\.com\/zephr-browser\/)/
allow_cookies: 1,
block_regex: /(\.sophi\.io\/|\.zephr\.com\/zephr-browser\/)/
},
"The Hill": {
domain: "thehill.com",

Loading…
Cancel
Save