From 4964705f6918eda4cf4c310d261d95242bd2f0ad Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 28 Apr 2011 00:39:52 +0200 Subject: Use self.on and self.postMessage instead of global on and postMessage. The reason is https://bugzilla.mozilla.org/show_bug.cgi?id=635748 and effort to save the world from global variables in content scripts. --- data/lib/bzpage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/lib/bzpage.js') diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js index f99d60c..3a832ea 100644 --- a/data/lib/bzpage.js +++ b/data/lib/bzpage.js @@ -318,7 +318,7 @@ function setConfigurationButton () { document.getElementById("configurationButton").addEventListener( "click", function(evt) { - postMessage(new Message("ChangeJSONURL", null)); + self.postMessage(new Message("ChangeJSONURL", null)); evt.stopPropagation(); evt.preventDefault(); }, false); @@ -423,7 +423,7 @@ function startup() { checkComments(); - postMessage(new Message("GetInstalledPackages", { + self.postMessage(new Message("GetInstalledPackages", { location: window.location.href, login: getLogin() })); -- cgit