diff options
Diffstat (limited to 'lib/main.js')
-rw-r--r-- | lib/main.js | 11 |
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)) { |