mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:21:58 +01:00
Fix-update LesEchos.fr (refresh cache)
This commit is contained in:
parent
434bfd18a8
commit
48740d761e
1 changed files with 10 additions and 7 deletions
|
@ -430,15 +430,12 @@ else if (matchDomain("cen.acs.org")) {
|
|||
|
||||
else if (matchDomain("lesechos.fr")) {
|
||||
window.setTimeout(function () {
|
||||
const ad_block = document.querySelectorAll('.jzxvkd-1');
|
||||
for (let i = 0; i < ad_block.length; i++) {
|
||||
ad_block[i].setAttribute('style', 'display:none');
|
||||
}
|
||||
const abo_banner = document.querySelector('[class^=pgxf3b]');
|
||||
removeDOMElement(abo_banner);
|
||||
|
||||
const url = window.location.href;
|
||||
const html = document.documentElement.outerHTML;
|
||||
// refresh cache
|
||||
if (!window.location.hash) {
|
||||
window.location.href = url + '#loaded'
|
||||
}
|
||||
const split1 = html.split('window.__PRELOADED_STATE__')[1];
|
||||
const split2 = split1.split('</script>')[0].trim();
|
||||
const state = split2.substr(1, split2.length - 2);
|
||||
|
@ -461,6 +458,12 @@ else if (matchDomain("lesechos.fr")) {
|
|||
console.warn('unable to parse lesechos text');
|
||||
console.warn(err);
|
||||
}
|
||||
const ad_block = document.querySelectorAll('.jzxvkd-1');
|
||||
for (let i = 0; i < ad_block.length; i++) {
|
||||
ad_block[i].setAttribute('style', 'display:none');
|
||||
}
|
||||
const abo_banner = document.querySelector('[class^=pgxf3b]');
|
||||
removeDOMElement(abo_banner);
|
||||
}, 500); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue