diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-02-14 17:51:53 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-02-14 17:57:45 +0100 |
commit | 04657077ba12e8f23feaa0c3787b590c44446056 (patch) | |
tree | ebe206422871e71b142985786a9472ff447be0cd /data/skip-bug.js | |
parent | 838c1d4abd72bd87dcc8ee41310ca3a8af498c96 (diff) | |
download | bugzilla-triage-04657077ba12e8f23feaa0c3787b590c44446056.tar.gz |
Basic functionality working. Switching to this bug for my day-to-day work.
Diffstat (limited to 'data/skip-bug.js')
-rw-r--r-- | data/skip-bug.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/data/skip-bug.js b/data/skip-bug.js new file mode 100644 index 0000000..9fcb531 --- /dev/null +++ b/data/skip-bug.js @@ -0,0 +1,20 @@ +// Released under the MIT/X11 license +// http://www.opensource.org/licenses/mit-license.php +// "use strict"; + +function reloadPage() { + var stemURL = 'https://HOSTNAME/show_bug.cgi?id='; + var titleElems = document.getElementsByTagName('title'); + if (titleElems) { + var REArr = new RegExp('[bB]ug\\s+([0-9]+)'). + exec(titleElems[0].textContent); + var hostname = document.location.hostname; + if (REArr) { + console.log("Reloading bug " + REArr[1] + "!"); + document.location = stemURL. + replace('HOSTNAME',hostname) + REArr[1]; + } + } +} + +reloadPage(); |