aboutsummaryrefslogtreecommitdiffstats
path: root/data/js
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2011-02-17 20:44:22 -0500
committerEhsan Akhgari <ehsan@mozilla.com>2011-02-17 20:44:22 -0500
commit0406fd5804e4c4303408f59c0df42d215bc0644e (patch)
treefdb2d050c36bd7c8c4bd290252fc7032b6351a38 /data/js
parent0d8f850effd1a0d0460160d8bbe4dccb8f5f1462 (diff)
downloadbugzilla-triage-0406fd5804e4c4303408f59c0df42d215bc0644e.tar.gz
Use the existing getBugNumber function
Diffstat (limited to 'data/js')
-rw-r--r--data/js/bug-page-mod.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/data/js/bug-page-mod.js b/data/js/bug-page-mod.js
index f800b0a..fcddcbd 100644
--- a/data/js/bug-page-mod.js
+++ b/data/js/bug-page-mod.js
@@ -52,7 +52,7 @@ function tweakBugzilla(d) {
// After POSTing, redirect with a GET back to the same bug
if (/\/(process_bug|attachment).cgi$/.test(d.location.href)) {
- var bug = getBugId(d);
+ var bug = getBugNumber(d);
if (bug) {
d.body.innerHTML = "Changes submitted; reloading bug " + bug;
var url = d.location.href;
@@ -443,15 +443,6 @@ function transformType(str, doc, old, new_) {
return str;
}
-function getBugId(d) {
- var classes = d.body.classList;
- for (var i = 0; i < classes.length; i++) {
- var m = /^bz_bug_(\d+)$/.exec(classes[i]);
- return m[1];
- }
- return undefined;
-}
-
// new is a keyword, which makes this function uglier than I'd like
function formatTransition(old, new_, type, doc, histDoc) {
if (old.length) {