mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
parent
4c364a9a72
commit
d4fc7027eb
2 changed files with 11 additions and 2 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue