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-06-05 14:46:50 +0200
commitcb82da27fc37ebe74aa9678506e72eb1a7308ca3 (patch)
tree743209aab4c515fd62c57c7f7982347ff760dec6 /data/lib/rhbzpage.js
parent680ad8225d72703dcdc98a128c7dd4f408a3018b (diff)
downloadbugzilla-triage-cb82da27fc37ebe74aa9678506e72eb1a7308ca3.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 a61eedf..69317ff 100644
--- a/data/lib/rhbzpage.js
+++ b/data/lib/rhbzpage.js
@@ -187,7 +187,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(),
@@ -274,7 +274,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;
}
@@ -311,7 +311,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() +
@@ -319,7 +319,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
}));