aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2010-11-01 21:28:12 -0400
committerEhsan Akhgari <ehsan@mozilla.com>2010-11-01 21:28:12 -0400
commitba6ff009fbc11eff77a5f91b777e4f33196338b6 (patch)
tree6d723f2767a7a4bbff025bef1063df6a7049d2fe /lib
parente6d9394bea821413c38842db099940ccf880e405 (diff)
downloadbugzilla-triage-ba6ff009fbc11eff77a5f91b777e4f33196338b6.tar.gz
Put the quicksearch text in the search boxes so that they can be edited
Diffstat (limited to 'lib')
-rw-r--r--lib/main.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/main.js b/lib/main.js
index c1d09bd..335edc8 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -87,6 +87,9 @@ function tweakBugzilla(d) {
if (!/bugzilla(-[a-zA-Z]+)*\.mozilla\.org/.test(d.location.href))
return;
+ // Put the quicksearch text in the quicksearch boxes
+ quicksearchHandler(d);
+
if (!d.getElementById("comments")) // don't process the mid-air collision pages
return;
@@ -553,6 +556,20 @@ function attachmentDiffLinkify(doc) {
}
}
+function quicksearchHandler(doc) {
+ var win = doc.defaultView;
+ var match = /quicksearch=([^&]+)/i.exec(win.location.search);
+ if (match) {
+ var quicksearch = unescape(match[1]);
+ var quicksearchBox = doc.querySelectorAll("input[name=quicksearch]");
+ if (quicksearchBox) {
+ for (var i = 0; i < quicksearchBox.length; ++i) {
+ quicksearchBox[i].value = quicksearch;
+ }
+ }
+ }
+}
+
function AttachmentFlagHandlerCtor() {
this._db = {};
this._interestingFlags = {};