Index: lib/main.js |
=================================================================== |
--- a/lib/main.js |
+++ b/lib/main.js |
@@ -42,22 +42,22 @@ request.addEventListener("load", functio |
let styleService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); |
let styleURI = Services.io.newURI("data:text/css," + encodeURIComponent(data), null, null); |
styleService.loadAndRegisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET); |
onShutdown.add(() => styleService.unregisterSheet(styleURI, Ci.nsIStyleSheetService.USER_SHEET)); |
}, false); |
request.send(null); |
// Load our developer tools actor |
-let frameScript = "chrome://elemhidehelper/content/frameScript.js?" + elementMarkerClass; |
-let messageManager = Cc["@mozilla.org/globalmessagemanager;1"] |
- .getService(Ci.nsIFrameScriptLoader); |
-messageManager.loadFrameScript(frameScript, true); |
+let processScript = "chrome://elemhidehelper/content/processScript.js?" + elementMarkerClass; |
+let messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"] |
+ .getService(Ci.nsIProcessScriptLoader); |
+messageManager.loadProcessScript(processScript, true); |
onShutdown.add(() => { |
- messageManager.removeDelayedFrameScript(frameScript); |
+ messageManager.removeDelayedProcessScript(processScript); |
messageManager.QueryInterface(Ci.nsIMessageBroadcaster).broadcastAsyncMessage("ElemHideHelper:Shutdown"); |
}); |
// Load overlay asynchonously and start attaching to windows once done |
request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIJSXMLHttpRequest); |
request.open("GET", "chrome://elemhidehelper/content/overlay.xul"); |
request.channel.owner = Cc["@mozilla.org/systemprincipal;1"].getService(Ci.nsIPrincipal); |
request.addEventListener("load", function(event) |