aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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 = {};