aboutsummaryrefslogtreecommitdiffstats
path: root/data/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/util.js')
-rw-r--r--data/util.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/data/util.js b/data/util.js
index e6871eb..7753458 100644
--- a/data/util.js
+++ b/data/util.js
@@ -44,14 +44,18 @@ function parseXMLfromString (inStuff) {
}
/**
+ * Get a bug no
+ */
+function getBugNo() {
+ return document.forms.namedItem('changeform').getElementsByName("id")[0].value;
+}
+
+/**
* Get a bug no from URL ... fails with aliases
- * It should theoretically belong to bzpage.js, but we don't have
- * unit tests there yet, so keeping here.
- *
* @param url String with URL to be analyzed
- * @return String with the bug ID (hopefully number, but not for aliases)
+ * @return String with the bug ID
*/
-function getBugNo(url) {
+function getBugNoFromURL(url) {
var params = getParamsFromURL(url);
if (params && params.id) {
return params.id;