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