aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-01-03 00:31:40 +0100
committerMatěj Cepl <mcepl@redhat.com>2012-01-03 00:31:40 +0100
commitfb662574627c9bc3477ccfaacd4e96bfda1f3e29 (patch)
tree2fe65d0da0f7adfcc848705bdaffd6c3395d07a5 /data
parent7eccc88d90b9e4967199519b3adf2e189ec02235 (diff)
downloadbugzilla-triage-fb662574627c9bc3477ccfaacd4e96bfda1f3e29.tar.gz
Hopefully fixes compatibility with bugs.eclipse.org.
Diffstat (limited to 'data')
-rw-r--r--data/lib/skip-bug.js19
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();