aboutsummaryrefslogblamecommitdiffstats
path: root/data/lib/jumpNextBug.js
blob: f07bed0abd322a0c0bbe94ac86543035e7abc203 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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";
}