diff options
-rw-r--r-- | data/lib/jumpNextBug.js | 15 | ||||
-rw-r--r-- | lib/main.js | 1 |
2 files changed, 16 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"; +} diff --git a/lib/main.js b/lib/main.js index fe97964..34feb32 100644 --- a/lib/main.js +++ b/lib/main.js @@ -113,6 +113,7 @@ var messageHandler = exports.messageHandler = function messageHandler(worker, ms var contentScriptLibraries = { "bugzilla.redhat.com": [ + self.data.url("lib/jumpNextBug.js"), self.data.url("lib/util.js"), self.data.url("lib/color.js"), self.data.url("lib/logging-front.js"), |