mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 06:07:47 +01:00
disable by regex only on enabled sites
This commit is contained in:
parent
c18b310ad2
commit
662780f1f6
1 changed files with 4 additions and 4 deletions
|
@ -171,10 +171,6 @@ browser.runtime.onInstalled.addListener(function (details) {
|
|||
|
||||
|
||||
browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
if (blockedRegexes.some(function(regex) { return regex.test(details.url); })) {
|
||||
return { cancel: true };
|
||||
}
|
||||
|
||||
var isEnabled = enabledSites.some(function(enabledSite) {
|
||||
|
||||
var useSite = details.url.indexOf("." + enabledSite) !== -1;
|
||||
|
@ -191,6 +187,10 @@ browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (blockedRegexes.some(function(regex) { return regex.test(details.url); })) {
|
||||
return { cancel: true };
|
||||
}
|
||||
|
||||
var requestHeaders = details.requestHeaders;
|
||||
var tabId = details.tabId;
|
||||
|
||||
|
|
Loading…
Reference in a new issue