Index: chrome/content/ui/sidebar.js |
=================================================================== |
--- a/chrome/content/ui/sidebar.js |
+++ b/chrome/content/ui/sidebar.js |
@@ -494,17 +494,23 @@ function doBlock() { |
var item = treeView.getSelectedItem(); |
if (!item || item.type == "ELEMHIDE") |
return; |
var filter = getFilter(item); |
if (filter && !filter.disabled && filter instanceof WhitelistFilter) |
return; |
- openDialog("chrome://adblockplus/content/ui/composer.xul", "_blank", "chrome,centerscreen,resizable,dialog=no,dependent", item.nodes, item.orig); |
+ if (requestNotifier) |
+ { |
+ requestNotifier.storeNodesForEntries(item.ids, (nodesID) => |
+ { |
+ UI.blockItem(window, nodesID, item.orig); |
+ }); |
+ } |
} |
function editFilter() |
{ |
var item = treeView.getSelectedItem(); |
if (treeView.data && !treeView.data.length) |
item = treeView.getDummyTooltip(); |
@@ -1102,17 +1108,17 @@ var treeView = { |
existing.ids.push(item.id); |
this.invalidateItem(existing); |
return; |
} |
// Add new item to the list |
// Store original item in orig property - reading out prototype is messed up in Gecko 1.9.2 |
- item = {__proto__: item, orig: item, nodes: [], ids: [item.id]}; |
+ item = {__proto__: item, orig: item, ids: [item.id]}; |
this.allData.push(item); |
this.dataMap[key] = item; |
// Show disabled filters if no other filter applies |
if (!item.filter) |
{ |
let disabledMatch = disabledMatcher.matchesAny(item.location, RegExpFilter.typeMap[item.type], item.docDomain, item.thirdParty); |
if (disabledMatch) |