mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
parent
4c364a9a72
commit
d4fc7027eb
@ -174,7 +174,16 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
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){
|
const match = function(url){
|
||||||
if (!url){
|
if (!url){
|
||||||
|
@ -6,7 +6,7 @@ Version 1.8:
|
|||||||
- added SVG protection
|
- added SVG protection
|
||||||
|
|
||||||
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