mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:21:58 +01:00
Fix ET Prime (mobile)
This commit is contained in:
parent
e1feb93e39
commit
6a26acaf12
4 changed files with 7 additions and 22 deletions
|
@ -6,7 +6,7 @@ var ext_name = manifestData.name;
|
|||
var ext_version = manifestData.version;
|
||||
|
||||
const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'].concat(de_westfalen_medien_domains);
|
||||
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'golem.de', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'limburger.nl', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spiegel.de', 'stratfor.com', 'tagesspiegel.de', 'techinasia.com', 'thetimes.co.uk', 'timesofindia.com', 'vn.nl', 'welt.de', 'wiwo.de'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
|
||||
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'golem.de', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'limburger.nl', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'spiegel.de', 'stratfor.com', 'tagesspiegel.de', 'techinasia.com', 'thetimes.co.uk', 'timesofindia.com', 'vn.nl', 'welt.de', 'wiwo.de'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
|
||||
var currentTabUrl = '';
|
||||
var csDone = false;
|
||||
var optin_setcookie = false;
|
||||
|
@ -999,6 +999,7 @@ if (matchUrlDomain(change_headers, details.url) && !['font', 'image', 'styleshee
|
|||
var googlebotEnabled = matchUrlDomain(use_google_bot, details.url) &&
|
||||
!(matchUrlDomain('abc.es', details.url) && mobile) &&
|
||||
!(matchUrlDomain('barrons.com', details.url) && enabledSites.includes('#options_disable_gb_barrons')) &&
|
||||
!(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/\?|#/)[0].endsWith('.cms')) &&
|
||||
!(matchUrlDomain('theaustralian.com.au', details.url) && !details.url.startsWith('https://www.theaustralian.com.au/the-oz/')) &&
|
||||
!(matchUrlDomain('thetimes.co.uk', details.url) && !(details.url.match(/\/epaper\.thetimes\.co\.uk\/article\//) || mobile)) &&
|
||||
!(matchUrlDomain('wsj.com', details.url) && enabledSites.includes('#options_disable_gb_wsj'));
|
||||
|
|
|
@ -10,6 +10,7 @@ Add Tagesspiegel.de
|
|||
Add Welt.de
|
||||
Add Wiwo.de
|
||||
Fix Australian Community Media (css)
|
||||
Fix ET Prime (mobile)
|
||||
Fix Groene.nl
|
||||
Fix Spiegel.de (Google webcache)
|
||||
Fix The Athletic (css & amp)
|
||||
|
|
|
@ -2839,29 +2839,12 @@ else if (matchDomain('economictimes.com')) {
|
|||
window.setTimeout(function () {
|
||||
let paywall = document.querySelector('div#blocker_layer');
|
||||
let data_prime = document.querySelector('div[data-prime="1"]');
|
||||
if ((paywall || data_prime) && dompurify_loaded) {
|
||||
let amphtml = document.querySelector('link[rel="amphtml"]');
|
||||
if ((paywall || data_prime) && amphtml) {
|
||||
removeDOMElement(paywall);
|
||||
if (data_prime)
|
||||
data_prime.removeAttribute('data-prime');
|
||||
let content = document.querySelector('div[id^="articlebody_"]');
|
||||
if (content && content.classList.contains('paywall')) {
|
||||
content.classList.remove('paywall');
|
||||
window.location.reload(true);
|
||||
}
|
||||
let full_text = document.querySelector('div.paywall:not([id])');
|
||||
if (content && full_text) {
|
||||
content.innerText = '';
|
||||
let parser = new DOMParser();
|
||||
let html = parser.parseFromString('<div>' + DOMPurify.sanitize(full_text.innerHTML, {ADD_ATTR: ['frameborder'], ADD_TAGS: ['iframe']}) + '</div>', 'text/html');
|
||||
let article = html.querySelector('div');
|
||||
content.appendChild(article);
|
||||
removeDOMElement(full_text);
|
||||
let data_adaptive = document.querySelector('div[data-adaptive="1"]');
|
||||
if (data_adaptive)
|
||||
data_adaptive.removeAttribute('data-adaptive');
|
||||
let prime_banner = document.querySelector('div.q0AQz');
|
||||
removeDOMElement(prime_banner);
|
||||
}
|
||||
window.location.href = amphtml.href;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
|
|
@ -703,5 +703,5 @@
|
|||
"*://gcm.omerlocdn.com/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "2.7.8.8"
|
||||
"version": "2.7.8.9"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue