aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-22 11:07:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-22 11:07:05 +0200
commit390f9042f82e4aaa6a57d08b9a5edfb38f688abf (patch)
tree0447d422d22b1f10f14cd462d454aea237aad610
parentd4a81c5de43ba4eed359ef0e25ed24b7399de3d5 (diff)
downloadbugzilla-triage-390f9042f82e4aaa6a57d08b9a5edfb38f688abf.tar.gz
Add variable children of bzpage back
-rw-r--r--lib/main.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/main.js b/lib/main.js
index 61a566d..d1e518d 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -70,7 +70,7 @@ function isOurPage(window, matchingURLs) {
}
/**
- *
+ *
*/
function skipThisPage(doc) {
var stemURL = "https://HOSTNAME/show_bug.cgi?id=";
@@ -125,7 +125,14 @@ exports.main = function main(options, callbacks) {
// is this good for anything?
if ("window" in window) { window = window.window; }
var doc = window.document;
- var construct = require("rhbzpage").RHBugzillaPage;
+
+ var construct = {};
+ var bzType = config.gJSONData.configData.objectStyle;
+ if (bzType === "RH") {
+ construct = require("rhbzpage").RHBugzillaPage;
+ } else if (bzType === "MoFo") {
+ construct = require("mozillabzpage").MozillaBugzilla;
+ }
if (isOurPage(window, config.matches)) {
var curPage = new construct(doc, config);
} else if (isOurPage(window, config.skipMatches)) {