diff --git a/lib/notifications.js b/lib/notifications.js index 8537b16..2a4b770 100644 --- a/lib/notifications.js +++ b/lib/notifications.js @@ -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); + } + } }, {