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