Index: new-options.js |
=================================================================== |
--- a/new-options.js |
+++ b/new-options.js |
@@ -432,6 +432,11 @@ |
{ |
filter.title = match[1]; |
collections.whitelist.addItem(filter); |
+ if (isCustomFiltersLoaded) |
+ { |
+ let text = getMessage("options_whitelist_notification", [filter.title]); |
+ showNotification(text); |
+ } |
} |
else |
{ |
@@ -585,6 +590,9 @@ |
case "edit-custom-filters": |
setCustomFiltersView("write"); |
break; |
+ case "hide-notification": |
+ hideNotification(); |
+ break; |
case "import-subscription": { |
let url = E("blockingList-textbox").value; |
addEnableSubscription(url); |
@@ -975,6 +983,19 @@ |
focusedBeforeDialog.focus(); |
} |
+ function showNotification(text) |
+ { |
+ E("notification").setAttribute("aria-hidden", false); |
+ E("notification-text").textContent = text; |
+ setTimeout(hideNotification, 3000); |
+ } |
+ |
+ function hideNotification() |
+ { |
+ E("notification").setAttribute("aria-hidden", true); |
+ E("notification-text").textContent = ""; |
+ } |
+ |
function setAcceptableAds() |
{ |
let option = "none"; |