aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bzpage.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js
index c88825d..f81b3da 100644
--- a/lib/bzpage.js
+++ b/lib/bzpage.js
@@ -29,6 +29,7 @@ var BZPage = function BZPage(win, config) {
this.ReporterColor = new Color(255, 255, 166); // RGB 255, 255, 166; HSL 60, 2,
// 83
// initialize dynamic properties
+ var that = this;
this.win = win;
this.doc = win.document;
this.packages = this.getInstalledPackages(config);
@@ -56,6 +57,28 @@ var BZPage = function BZPage(win, config) {
this.setUpLogging();
}
+ // configuration button
+ var additionalButtons = this.doc.querySelector("#bugzilla-body *.related_actions");
+ var configurationButtonUI = this.doc.createElement("li");
+ configurationButtonUI.innerHTML = "\u00A0-\u00A0<a href='#' id='configurationButton'>"
+ + "Configuration buttons</a>";
+ additionalButtons.appendChild(configurationButtonUI);
+ this.doc.getElementById("configurationButton").addEventListener(
+ "click",
+ function(evt) {
+ var prfNm = BSTPrefNS+"JSONURL";
+ var url = preferences.get(prfNm,"");
+
+ var reply = that.win.prompt("New location of JSON configuration file",url);
+ if (reply) {
+ preferences.set(prfNm,reply.trim());
+ that.win.alert("For now, you should really restart Firefox!");
+ }
+
+ evt.stopPropagation();
+ evt.preventDefault();
+ }, false);
+
this.submitHandlerInstalled = false;
this.bugNo = util.getBugNo(this.doc.location.toString());