aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/jumpNextBug.js
blob: 68e719bae18d1c3fb12cf1f04936daefa99cb403 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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);
});
console.log("filteredElements.length = " + filteredElements.length);
if (filteredElements.length > 0) {
  nextElement = filteredElements[0];
  nextElement.setAttribute("accesskey", "n");
  nextElement.innerHTML = "<u>N</u>ext";
}