From 390f9042f82e4aaa6a57d08b9a5edfb38f688abf Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Tue, 22 Jun 2010 11:07:05 +0200 Subject: Add variable children of bzpage back --- lib/main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') 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)) { -- cgit