1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 21:00:23 +01:00

Reenabled "whitelist URL"

Added proper escaping to the URL.

This fixes #28
This commit is contained in:
kkapsner 2015-05-11 10:55:12 +02:00
parent d1cf450ce5
commit 0a4b92508a
2 changed files with 10 additions and 10 deletions

Binary file not shown.

View File

@ -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: "",