diff options
author | Matěj Cepl <mcepl@redhat.com> | 2012-01-03 00:31:40 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2012-01-03 00:31:40 +0100 |
commit | fb662574627c9bc3477ccfaacd4e96bfda1f3e29 (patch) | |
tree | 2fe65d0da0f7adfcc848705bdaffd6c3395d07a5 /data | |
parent | 7eccc88d90b9e4967199519b3adf2e189ec02235 (diff) | |
download | bugzilla-triage-fb662574627c9bc3477ccfaacd4e96bfda1f3e29.tar.gz |
Hopefully fixes compatibility with bugs.eclipse.org.
Diffstat (limited to 'data')
-rw-r--r-- | data/lib/skip-bug.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/data/lib/skip-bug.js b/data/lib/skip-bug.js index 389eb54..4b4cd34 100644 --- a/data/lib/skip-bug.js +++ b/data/lib/skip-bug.js @@ -3,14 +3,17 @@ // "use strict"; function reloadPage() { - var titleElems = document.getElementsByTagName('title'); - if (titleElems) { - var REArr = new RegExp('[bB]ug\\s+([0-9]+)') - .exec(titleElems[0].textContent); - if (REArr) { - document.location = '/show_bug.cgi?id=' + REArr[1]; - } - } + var titleElems = document.getElementsByTagName('title'); + if (titleElems) { + var REArr = new RegExp('[bB]ug\\s+([0-9]+)') + .exec(titleElems[0].textContent); + if (REArr) { + var URLArr = document.location.path.split("/"); + document.location = URLArr.slice(0, URLArr.length - 1).join("/") + + "/show_bug.cgi?id=" + REArr[1]; + } + } } +console.log("asdasd"); reloadPage(); |