mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-23 05:10:27 +01:00
parent
4443d0a117
commit
cfb09075eb
10
lib/lists.js
10
lib/lists.js
@ -15,6 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const settings = require("./settings");
|
const settings = require("./settings");
|
||||||
|
const logging = require("./logging");
|
||||||
|
|
||||||
|
|
||||||
function getDomainRegExpList(domainList){
|
function getDomainRegExpList(domainList){
|
||||||
@ -33,8 +34,17 @@
|
|||||||
regExp = new RegExp("(?:^|\\.)" + entry.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$", "i");
|
regExp = new RegExp("(?:^|\\.)" + entry.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$", "i");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
try {
|
||||||
regExp = new RegExp(entry, "i");
|
regExp = new RegExp(entry, "i");
|
||||||
}
|
}
|
||||||
|
catch (error){
|
||||||
|
logging.error("Error in regular expression", entry, error);
|
||||||
|
regExp = new RegExp(
|
||||||
|
"(?:^|\\.)" + entry.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$",
|
||||||
|
"i"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
value: entry,
|
value: entry,
|
||||||
match: function(url){
|
match: function(url){
|
||||||
|
@ -6,7 +6,7 @@ Version 1.9:
|
|||||||
-
|
-
|
||||||
|
|
||||||
fixes:
|
fixes:
|
||||||
-
|
- errors in URL regular expressions broke CB
|
||||||
|
|
||||||
known issues:
|
known issues:
|
||||||
- if a data URL is blocked the page action button does not appear
|
- if a data URL is blocked the page action button does not appear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user