mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +01:00
Added prompts for domain and URL whitelist adding in notification as mentioned in issue #40.
This commit is contained in:
parent
72ebf99297
commit
9255fb5813
@ -62,14 +62,27 @@ exports.notify = function(window, callingStackMsg){
|
||||
label: _("whitelistURL"),
|
||||
accessKey: "",
|
||||
callback: function(){
|
||||
lists.appendTo("white", "^" + notification.url.replace(/([\\\+\*\?\[\^\]\$\(\)\{\}\=\!\|\.])/g, "\\$1") + "$");
|
||||
var url = browser.contentWindow.prompt(
|
||||
"Input URL RegExp to add to white list:",
|
||||
"^" + notification.url.replace(/([\\\+\*\?\[\^\]\$\(\)\{\}\=\!\|\.])/g, "\\$1") + "$"
|
||||
);
|
||||
if (url){
|
||||
lists.appendTo("white", url);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: _("whitelistDomain"),
|
||||
accessKey: "",
|
||||
callback: function(){
|
||||
lists.appendTo("white", notification.domain);
|
||||
var domain = browser.contentWindow.prompt(
|
||||
"Input domain to add to white list:",
|
||||
notification.domain
|
||||
);
|
||||
if (domain){
|
||||
lists.appendTo("white", domain);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user