mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:07:47 +01:00
Fix-update Challenges.fr (proper)
This commit is contained in:
parent
9a6b5b7f06
commit
f4118466ba
2 changed files with 9 additions and 20 deletions
|
@ -148,7 +148,7 @@ var blockedRegexes = {
|
||||||
'bloomberg.com': /.+\.tinypass\.com\/.+/,
|
'bloomberg.com': /.+\.tinypass\.com\/.+/,
|
||||||
'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/,
|
'bostonglobe.com': /meter\.bostonglobe\.com\/js\/.+/,
|
||||||
'businessinsider.com': /(.+\.tinypass\.com\/.+|cdn\.onesignal\.com\/sdks\/.+\.js)/,
|
'businessinsider.com': /(.+\.tinypass\.com\/.+|cdn\.onesignal\.com\/sdks\/.+\.js)/,
|
||||||
'challenges.fr': /(.+\.challenges\.fr\/js\/|.+\.poool\.fr\/.+)/,
|
'challenges.fr': /.+\.poool\.fr\/.+/,
|
||||||
'chicagobusiness.com': /.+\.tinypass\.com\/.+/,
|
'chicagobusiness.com': /.+\.tinypass\.com\/.+/,
|
||||||
'chicagotribune.com': /.+:\/\/.+\.tribdss\.com\//,
|
'chicagotribune.com': /.+:\/\/.+\.tribdss\.com\//,
|
||||||
'corriere.it': /(\.rcsobjects\.it\/rcs_cpmt\/|\.rcsobjects\.it\/rcs_tracking-service\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|\.corriereobjects\.it\/.*\/js\/tracking\/|\.userzoom\.com\/files\/js\/|\.lp4\.io\/app\/)/,
|
'corriere.it': /(\.rcsobjects\.it\/rcs_cpmt\/|\.rcsobjects\.it\/rcs_tracking-service\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|\.corriereobjects\.it\/.*\/js\/tracking\/|\.userzoom\.com\/files\/js\/|\.lp4\.io\/app\/)/,
|
||||||
|
@ -196,10 +196,6 @@ var blockedRegexes = {
|
||||||
'thenation.com': /.+\.tinypass\.com\/.+/,
|
'thenation.com': /.+\.tinypass\.com\/.+/,
|
||||||
'valeursactuelles.com': /.+\.poool\.fr\/.+/
|
'valeursactuelles.com': /.+\.poool\.fr\/.+/
|
||||||
};
|
};
|
||||||
// browser-specific block
|
|
||||||
if (ext_api === chrome) {
|
|
||||||
blockedRegexes['challenges.fr'] = /.+\.poool\.fr\/.+/;
|
|
||||||
}
|
|
||||||
|
|
||||||
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||||
const userAgentMobile = "Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"
|
const userAgentMobile = "Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"
|
||||||
|
|
|
@ -505,21 +505,14 @@ else if (matchDomain('ladepeche.fr')) {
|
||||||
|
|
||||||
else if (matchDomain('challenges.fr')) {
|
else if (matchDomain('challenges.fr')) {
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const hidden_par = document.querySelector('.corps[style="display:none"]');
|
const amorce = document.querySelector('.user-paying-amorce');
|
||||||
if (hidden_par) {
|
if (amorce)
|
||||||
hidden_par.removeAttribute('style');
|
amorce.setAttribute('style', 'display:none !important');
|
||||||
}
|
const content = document.querySelector('.user-paying-content');
|
||||||
if (typeof browser === 'object'){
|
if (content)
|
||||||
const hidden_image = document.querySelectorAll('img.lazyload');
|
content.setAttribute('style', 'display: block !important');
|
||||||
for (let i = 0; i < hidden_image.length; i++) {
|
const paywall = document.querySelector('.temp-paywall');
|
||||||
var src = hidden_image[i].src;
|
removeDOMElement(paywall);
|
||||||
if (src.includes("/placeholders/") || src === '') {
|
|
||||||
var data_src = hidden_image[i].getAttribute("data-src");
|
|
||||||
if (data_src)
|
|
||||||
hidden_image[i].setAttribute('src', data_src);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue