mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Reenabled "whitelist URL"
Added proper escaping to the URL. This fixes #28
This commit is contained in:
parent
d1cf450ce5
commit
0a4b92508a
Binary file not shown.
20
lib/main.js
20
lib/main.js
@ -178,16 +178,16 @@
|
||||
updateIgnoreList();
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: _("whitelistURL"),
|
||||
// accessKey: "",
|
||||
// callback: function(){
|
||||
// prefs.whiteList += (prefs.whiteList? ",": "") + url;
|
||||
// prefService.set("extensions.CanvasBlocker@kkapsner.de.whiteList", prefs.whiteList);
|
||||
// updateWhiteList();
|
||||
// workers.forEach(checkWorker);
|
||||
// }
|
||||
// },
|
||||
{
|
||||
label: _("whitelistURL"),
|
||||
accessKey: "",
|
||||
callback: function(){
|
||||
prefs.whiteList += (prefs.whiteList? ",": "") + "^" + url.replace(/([\\\+\*\?\[\^\]\$\(\)\{\}\=\!\|\.])/g, "\\$1") + "$";
|
||||
prefService.set("extensions.CanvasBlocker@kkapsner.de.whiteList", prefs.whiteList);
|
||||
updateWhiteList();
|
||||
workers.forEach(checkWorker);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: _("whitelistDomain"),
|
||||
accessKey: "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user