mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
parent
4c364a9a72
commit
d4fc7027eb
@ -174,7 +174,16 @@
|
||||
);
|
||||
}
|
||||
else {
|
||||
regExp = new RegExp(urlSetting.url, "i");
|
||||
try {
|
||||
regExp = new RegExp(urlSetting.url, "i");
|
||||
}
|
||||
catch (error){
|
||||
logging.error("Error in regular expression", urlSetting.url, error);
|
||||
regExp = new RegExp(
|
||||
"(?:^|\\.)" + urlSetting.url.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$",
|
||||
"i"
|
||||
);
|
||||
}
|
||||
}
|
||||
const match = function(url){
|
||||
if (!url){
|
||||
|
@ -6,7 +6,7 @@ Version 1.8:
|
||||
- added SVG protection
|
||||
|
||||
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