|
|
|
@ -430,36 +430,14 @@ else if (matchDomain("afr.com")) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (matchDomain("theglobeandmail.com")) {
|
|
|
|
|
let subscribed = document.querySelector('html.story-subscribed');
|
|
|
|
|
if (subscribed && !window.location.href.includes('?ref=premium')) {
|
|
|
|
|
window.setTimeout(function () {
|
|
|
|
|
window.location.href = new URL(window.location.href).pathname + '?ref=premium';
|
|
|
|
|
}, 100);
|
|
|
|
|
}
|
|
|
|
|
let lazy_images = document.querySelectorAll('.js-lazyimage');
|
|
|
|
|
for (let lazy_image of lazy_images) {
|
|
|
|
|
lazy_image.classList.remove('js-lazyimage');
|
|
|
|
|
}
|
|
|
|
|
let hidden_images = document.querySelectorAll('img');
|
|
|
|
|
for (let hidden_image of hidden_images) {
|
|
|
|
|
var src = hidden_image.src;
|
|
|
|
|
if (src.includes("data:image/gif")) {
|
|
|
|
|
var data_src = hidden_image.getAttribute("data-src");
|
|
|
|
|
if (data_src)
|
|
|
|
|
hidden_image.setAttribute('src', data_src);
|
|
|
|
|
var data_bg = hidden_image.getAttribute("data-bg");
|
|
|
|
|
if (data_bg)
|
|
|
|
|
hidden_image.setAttribute('src', data_bg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let c_cards = document.querySelectorAll('div.c-card');
|
|
|
|
|
for (let c_card of c_cards) {
|
|
|
|
|
var a_link = c_card.querySelector('a');
|
|
|
|
|
var subscr_key = c_card.querySelector('span.c-indicator-icon--key');
|
|
|
|
|
if (subscr_key && a_link && !a_link.href.includes('?ref=premium')) {
|
|
|
|
|
a_link.href = a_link.href + '?ref=premium';
|
|
|
|
|
}
|
|
|
|
|
function tgam_main() {
|
|
|
|
|
document.addEventListener('bpc_event', function (e) {
|
|
|
|
|
if (window.tgam)
|
|
|
|
|
window.tgam.keytar.subscriberPaywallEnabled = false;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
insert_script(tgam_main);
|
|
|
|
|
document.dispatchEvent(new CustomEvent('bpc_event', {}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (matchDomain("sofrep.com")) {
|
|
|
|
|