aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-02 16:56:57 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-02 17:53:57 +0100
commit093d38ebf3716b2d9ab7397afbc4f479682e28fc (patch)
treeb5cf82598bc894947cf60e12e642e804333a1990 /data/lib
parentea71f2b3c7d6b7e8a2a63669aa818d79ad85ffa0 (diff)
downloadbugzilla-triage-093d38ebf3716b2d9ab7397afbc4f479682e28fc.tar.gz
Add a 'n' accesskey to Next link to next bug
Diffstat (limited to 'data/lib')
-rw-r--r--data/lib/jumpNextBug.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/data/lib/jumpNextBug.js b/data/lib/jumpNextBug.js
new file mode 100644
index 0000000..f07bed0
--- /dev/null
+++ b/data/lib/jumpNextBug.js
@@ -0,0 +1,15 @@
+// Released under the MIT/X11 license
+// http://www.opensource.org/licenses/mit-license.php
+"use strict";
+var nextElement = {};
+var nextRE = new RegExp("Next");
+
+var aNavigElements = document.querySelectorAll("#bugzilla-body .navigation a");
+var filteredElements = Array.filter(aNavigElements, function(elem) {
+ return nextRE.test(elem.textContent);
+});
+if (filteredElements.length > 0) {
+ nextElement = filteredElements[0];
+ nextElement.setAttribute("accesskey", "n");
+ nextElement.innerHTML = "<u>N</u>ext";
+}