mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 02:04:16 +01:00
Fix LesEchos.fr (json)
This commit is contained in:
parent
61c4adb94e
commit
ea61752c70
3 changed files with 5 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
||||||
Changelog Bypass Paywalls Clean - Firefox
|
Changelog Bypass Paywalls Clean - Firefox
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
|
Fix LesEchos.fr (json)
|
||||||
Fix WaPo (images)
|
Fix WaPo (images)
|
||||||
Fix WSJ (timing)
|
Fix WSJ (timing)
|
||||||
|
|
||||||
|
|
|
@ -947,12 +947,10 @@ else if (matchDomain('lesechos.fr') && window.location.href.match(/-\d{6,}/)) {
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
let html = document.documentElement.outerHTML;
|
let html = document.documentElement.outerHTML;
|
||||||
let state;
|
let state;
|
||||||
let split1 = html.split('window.__PRELOADED_STATE__=')[1];
|
let split1 = html.split('window.__CONFIG__=')[1];
|
||||||
let split2 = split1.split('</script>')[0].trim();
|
let split2 = split1.split('</script>')[0].trim();
|
||||||
if (split2.includes('; window.__DATA__=')) {
|
if (split2.includes('; window.__DATA__=')) {
|
||||||
state = split2.split('; window.__DATA__=')[0].trim();
|
state = split2.split('; window.__DATA__=')[1].split('; window.__')[0].trim();
|
||||||
if (state.length < 200)
|
|
||||||
state = split2.split('; window.__DATA__=')[1].split('; window.__')[0].trim();
|
|
||||||
} else
|
} else
|
||||||
state = split2.substr(0, split2.length - 1);
|
state = split2.substr(0, split2.length - 1);
|
||||||
try {
|
try {
|
||||||
|
@ -1073,7 +1071,7 @@ else if (matchDomain('ilfattoquotidiano.it')) {
|
||||||
hidden_content.setAttribute('style', 'display:block !important;');
|
hidden_content.setAttribute('style', 'display:block !important;');
|
||||||
let amp_ads = document.querySelectorAll('amp-ad, div#_4sVideoContainer');
|
let amp_ads = document.querySelectorAll('amp-ad, div#_4sVideoContainer');
|
||||||
removeDOMElement(...amp_ads);
|
removeDOMElement(...amp_ads);
|
||||||
} else {
|
} else if (url.split('?')[0].match(/\/\d{4}\/\d{2}\/\d{2}\//)) {
|
||||||
let paywall = document.querySelector('div.read-more');
|
let paywall = document.querySelector('div.read-more');
|
||||||
if (paywall) {
|
if (paywall) {
|
||||||
removeDOMElement(paywall);
|
removeDOMElement(paywall);
|
||||||
|
|
|
@ -556,5 +556,5 @@
|
||||||
"*://*.wallkit.net/*",
|
"*://*.wallkit.net/*",
|
||||||
"*://*.wsj.net/*"
|
"*://*.wsj.net/*"
|
||||||
],
|
],
|
||||||
"version": "2.4.2.1"
|
"version": "2.4.2.2"
|
||||||
}
|
}
|
Loading…
Reference in a new issue