Index: lib/objectTabs.js |
=================================================================== |
--- a/lib/objectTabs.js |
+++ b/lib/objectTabs.js |
@@ -16,16 +16,17 @@ |
*/ |
/** |
* @fileOverview Code responsible for showing and hiding object tabs. |
*/ |
let {Prefs} = require("prefs"); |
let {Utils} = require("utils"); |
+let {port} = require("messaging"); |
/** |
* Random element class, to be used for object tabs displayed on top of the |
* plugin content. |
* @type string |
*/ |
let classVisibleTop = null; |
@@ -37,35 +38,35 @@ let classVisibleTop = null; |
let classVisibleBottom = null; |
/** |
* Random element class, to be used for object tabs that are hidden. |
* @type string |
*/ |
let classHidden = null; |
-Utils.addChildMessageListener("AdblockPlus:GetObjectTabsStatus", function() |
+port.on("getObjectTabsStatus", function(message, sender) |
{ |
let {UI} = require("ui"); |
return !!(Prefs.enabled && Prefs.frameobjects && UI.overlay && classHidden); |
}); |
-Utils.addChildMessageListener("AdblockPlus:GetObjectTabsTexts", function() |
+port.on("getObjectTabsTexts", function(message, sender) |
{ |
let {UI} = require("ui"); |
return { |
label: UI.overlay.attributes.objtabtext, |
tooltip: UI.overlay.attributes.objtabtooltip, |
classVisibleTop, classVisibleBottom, classHidden |
}; |
}); |
-Utils.addChildMessageListener("AdblockPlus:BlockItem", function({request, nodesID}) |
+port.on("blockItem", function({request, nodesID}, sender) |
{ |
let {UI} = require("ui"); |
UI.blockItem(UI.currentWindow, nodesID, request); |
}); |
function init() |
{ |
function processCSSData(event) |