aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 00:39:52 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-04-28 00:46:45 +0200
commit4964705f6918eda4cf4c310d261d95242bd2f0ad (patch)
tree335ea177b9e437ce5cf17449b56efec0d4f75487 /data/lib/rhbzpage.js
parentbc4c8cfcc7bb9814a0a4ce73d402e37fa7c0eedd (diff)
downloadbugzilla-triage-4964705f6918eda4cf4c310d261d95242bd2f0ad.tar.gz
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.
Diffstat (limited to 'data/lib/rhbzpage.js')
-rw-r--r--data/lib/rhbzpage.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js
index 2e68c0a..a82d975 100644
--- a/data/lib/rhbzpage.js
+++ b/data/lib/rhbzpage.js
@@ -185,7 +185,7 @@ function sendBugUpstream() {
return null;
}
- postMessage(new Message("OpenBugUpstream", {
+ self.postMessage(new Message("OpenBugUpstream", {
url: urlStr,
subject: document.getElementById("short_desc_nonedit_display").
textContent.trim(),
@@ -272,7 +272,7 @@ function chipsetMagic (interestingLineArr) {
PCIid = PCIid.toLowerCase().replace(",",":");
cardStr = null;
alert("PCI ID " + PCIid + " is not known!");
- postMessage(new Message("SetClipboard", PCIid.toString()));
+ self.postMessage(new Message("SetClipboard", PCIid.toString()));
} catch (e) {
throw e;
}
@@ -309,7 +309,7 @@ function analyzeXorg(results) {
innerString += "No matching lines found!";
}
- postMessage(new Message("OpenStringInPanel",
+ self.postMessage(new Message("OpenStringInPanel",
'<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">' +
"<html><head><title>Xorg.0.log analysis</title></head><body><pre>\n" +
innerString.trim() +
@@ -317,7 +317,7 @@ function analyzeXorg(results) {
}
function analyzeXorgLog(attachID, backMsg) {
- postMessage(new Message("GetURL", {
+ self.postMessage(new Message("GetURL", {
url: "https://" + window.location.hostname + "/attachment.cgi?id=" + attachID,
backMessage: backMsg
}));