Index: chrome/content/options.js |
=================================================================== |
--- a/chrome/content/options.js |
+++ b/chrome/content/options.js |
@@ -73,7 +73,7 @@ |
whitelist.sort(); |
// Add the rules to the list |
- if(ruleList.length > 0) |
+ if (ruleList.length > 0) |
{ |
for (let i = 0; i < ruleList.length; i++) |
{ |
@@ -102,7 +102,7 @@ |
ruleListElement.appendChild(option); |
} |
- if(whitelist.length > 0) |
+ if (whitelist.length > 0) |
{ |
for (let i = 0; i < whitelist.length; i++) |
{ |
@@ -142,10 +142,15 @@ |
let list = E(btn.getAttribute("_list")); |
let items = list.selectedItems; |
+ let {onWhitelistEntryRemoved} = require("rules"); |
+ |
for (let i = items.length - 1; i >= 0; i--) |
{ |
let searchString = items[i].getAttribute("value"); |
delete Prefs[pref][searchString]; |
+ |
+ if (pref == "whitelist") |
+ onWhitelistEntryRemoved(searchString); |
} |
Prefs[pref] = JSON.parse(JSON.stringify(Prefs[pref])); |
} |