Fix La Croix (timing)

This commit is contained in:
magnolia1234 2021-10-20 17:53:02 +02:00
parent 784a08f3da
commit 3207a8924c
3 changed files with 6 additions and 9 deletions

View file

@ -6,7 +6,7 @@ var manifestData = ext_api.runtime.getManifest();
var ext_name = manifestData.name;
var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'inkl.com', 'la-croix.com', 'nation.africa', 'nationalgeographic.com'];
const cs_limit_except = ['elespanol.com', 'faz.net', 'inkl.com', 'nation.africa', 'nationalgeographic.com'];
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;
@ -348,7 +348,7 @@ var blockedRegexes = {
'jpost.com': /\.jpost\.com\/bundles\/js_article\?/,
'knack.be': /\.knack\.be\/js\/responsive\/rmgModal\.js/,
'kurier.at': /\.tinypass\.com\//,
'la-croix.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js/,
'la-croix.com': /(\.la-croix\.com\/build\/lacroix\/article.+\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/,
'lasegunda.com': /\.(lasegunda\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/,
'latercera.com': /(\.latercera\.com\/arc\/subs\/p\.js|cdn\.cxense\.com\/)/,
'latimes.com': /metering\.platform\.latimes\.com\/v\d\/meter/,

View file

@ -6,6 +6,7 @@ Fix ABC.es (Evolok)
Fix Business Standard
Fix Il Tirreno (GElocal.it)
Fix Financial Times (amp)
Fix La Croix (timing)
Fix Trouw.nl (timing)
Update custom sites (block regex for default sites)

View file

@ -917,13 +917,9 @@ else if (matchDomain('journaldunet.com')) {
else if (matchDomain('la-croix.com')) {
let url = window.location.href;
if (!url.includes('la-croix.com/amp/')) {
let paywall_host_param = document.querySelector('#paywall-host-param');
removeDOMElement(paywall_host_param);
let show_paywall = document.querySelector('#showPayWall');
if (show_paywall)
window.setTimeout(function () {
window.location.reload(true);
}, 500);
let hidden_images = document.querySelectorAll('source[srcset]');
for (elem of hidden_images)
elem.removeAttribute('srcset');
} else {
let paywall_block = document.querySelector('#paywall_block');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');