Update limit contentScript (add image/sub_frame)

This commit is contained in:
magnolia1234 2021-02-15 19:06:51 +01:00
parent 9b231eb594
commit 6041c8970d
4 changed files with 5 additions and 6 deletions

View file

@ -4,7 +4,7 @@
var ext_api = (typeof browser === 'object') ? browser : chrome;
var ext_name = ext_api.runtime.getManifest().name;
const cs_limit_except = ['afr.com', 'discovermagazine.com', 'elcomercio.pe', 'elmercurio.com', 'elpais.com', 'faz.net', 'gestion.pe', 'harpers.org', 'inkl.com', 'jpost.com', 'la-croix.com', 'lescienze.it', 'lne.es', 'marketwatch.com', 'newleftreview.org', 'prospectmagazine.co.uk', 'techinasia.com', 'thepointmag.com'];
const cs_limit_except = ['inkl.com', 'la-croix.com'];
var currentTabUrl = '';
var csDone = false;
@ -25,7 +25,7 @@ const restrictions = {
'globo.com': /^((?!\/valor\.globo\.com\/).)*$/,
'quora.com': /^((?!quora\.com\/search\?q=).)*$/,
'seekingalpha.com': /.+\/seekingalpha\.com\/($|(amp\/)?(article|news)\/|samw\/)/,
'techinasia.com': /.+\.techinasia\.com\/.+((\w)+(\-)+){3,}.+/,
'techinasia.com': /\.techinasia\.com\/.+/,
'wsj.com': /^((?!\/cn\.wsj\.com\/).)*$/
}
@ -1017,7 +1017,7 @@ if (['main_frame', 'xmlhttprequest'].includes(details.type) && matchUrlDomain(ch
csDone = false;
currentTabUrl = currentTab.url;
}
if ((['main_frame', 'script', 'other', 'xmlhttprequest'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
if ((['main_frame', 'script', 'image', 'sub_frame', 'xmlhttprequest'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
ext_api.tabs.executeScript(tabId, {
file: 'contentScript.js',
runAt: 'document_start'

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Update limit contentScript (add image/sub_frame)
* v2.0.8.0 (2021-02-14)
Add Augsburger Allgemeine (Germany)

View file

@ -1707,8 +1707,6 @@ else if (matchDomain('la-croix.com')) {
if (!url.includes('la-croix.com/amp/')) {
let paywall_host_param = document.querySelector('#paywall-host-param');
removeDOMElement(paywall_host_param);
if (paywall_host_param)
csDone = true;
} else {
let paywall_block = document.querySelector('#paywall_block');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');

View file

@ -472,5 +472,5 @@
"*://*.userzoom.com/*",
"*://*.wsj.net/*"
],
"version": "2.0.8.0"
"version": "2.0.8.1"
}