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 |
{ |
@@ -588,6 +593,9 @@ |
case "edit-custom-filters": |
setCustomFiltersView("write"); |
break; |
+ case "hide-notification": |
+ hideNotification(); |
+ break; |
case "import-subscription": { |
let url = E("blockingList-textbox").value; |
addEnableSubscription(url); |
@@ -993,6 +1001,19 @@ |
focusedBeforeDialog.focus(); |
} |
+ function showNotification(text) |
ire
2017/08/25 09:59:45
This doesn't need to hold up this review, but we c
saroyanm
2017/08/25 11:04:19
It's bit difficult because we don't know where is
ire
2017/08/25 12:10:07
Okay good point. In light of what you said, I thin
saroyanm
2017/08/25 12:22:55
I agree
|
+ { |
+ 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"; |