aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
blob: 21d05461c59a1e8a4400bf75fd7f3af259a9b257 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*jslint onevar: false, browser: true, evil: true, laxbreak: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, maxerr: 1000, immed: false, white: false, plusplus: false, regexp: false, undef: false */
/*global jetpack */
// Released under the MIT/X11 license
// http://www.opensource.org/licenses/mit-license.php
"use strict";
var util = require("util");
var apiUtils = require("api-utils");
var BZPage = require("bzpage").BZPage;

// ====================================================================================
// RHBugzillaPage object

var RHBugzillaPage = function RHBugzillaPage(doc, config) {
    // inheritance ... call superobject's constructor
    BZPage.call(this, doc, config);

    console.log("location = " + this.doc.location);
    
    //this.bugId = this.getBugId();
    this.bugId = util.getBugNo(this.doc.location.href);
    console.log("doc = " + this.doc.location);
    console.log("bug number = " + this.bugId);
    console.log("bug URL = " + this.getURL());
    this.bugId = this.getBugId();
    console.log("bug# = " + this.getBugId());
    console.log("Now we are outside!");
}; // END OF RHBugzillaPage CONSTRUCTOR

RHBugzillaPage.prototype.toString = function toString () {
    return ("[Object RHBugzillaPage]");
};

RHBugzillaPage.prototype = util.heir(BZPage);
RHBugzillaPage.prototype.constructor = RHBugzillaPage;

//exports.RHBugzillaPage = apiUtils.publicConstructor(RHBugzillaPage);
exports.RHBugzillaPage = RHBugzillaPage;