mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 04:40:20 +01:00
parent
cfb09075eb
commit
4bd0c0c96c
@ -29,9 +29,12 @@
|
||||
})
|
||||
.map(function(entry){
|
||||
let regExp;
|
||||
const domain = !!entry.match(/^[A-Za-z0-9_.-]+$/);
|
||||
const domain = !!entry.match(/^[A-Za-z0-9_.*-]+$/);
|
||||
if (domain){
|
||||
regExp = new RegExp("(?:^|\\.)" + entry.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$", "i");
|
||||
regExp = new RegExp(
|
||||
"(?:^|\\.)" + entry.replace(/([\\+?[^\]$(){}=!|.])/g, "\\$1").replace(/\*/g, ".+") + "\\.?$",
|
||||
"i"
|
||||
);
|
||||
}
|
||||
else {
|
||||
try {
|
||||
|
@ -166,10 +166,10 @@
|
||||
|
||||
function initializeUrlSetting(urlSetting){
|
||||
let regExp;
|
||||
const domain = !!urlSetting.url.match(/^[A-Za-z0-9_.-]+$/);
|
||||
const domain = !!urlSetting.url.match(/^[A-Za-z0-9_.*-]+$/);
|
||||
if (domain){
|
||||
regExp = new RegExp(
|
||||
"(?:^|\\.)" + urlSetting.url.replace(/([\\+*?[^\]$(){}=!|.])/g, "\\$1") + "\\.?$",
|
||||
"(?:^|\\.)" + urlSetting.url.replace(/([\\+?[^\]$(){}=!|.])/g, "\\$1").replace(/\*/g, ".+") + "\\.?$",
|
||||
"i"
|
||||
);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ Version 1.9:
|
||||
- update setting descriptions
|
||||
|
||||
new features:
|
||||
-
|
||||
- added support for wildcards (*) in domains
|
||||
|
||||
fixes:
|
||||
- errors in URL regular expressions broke CB
|
||||
|
@ -225,6 +225,14 @@
|
||||
{
|
||||
"version": "1.9Alpha20220218",
|
||||
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.9Alpha20220218-an+fx.xpi"
|
||||
},
|
||||
{
|
||||
"version": "1.9Alpha20220424",
|
||||
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.9Alpha20220424-an+fx.xpi"
|
||||
},
|
||||
{
|
||||
"version": "1.9Alpha20220426",
|
||||
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.9Alpha20220426-an+fx.xpi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user