aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bzpage.js
blob: dcaa43c5cdcc245721506b1eee8bbd33b5759f70 (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
/*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 simpleStorage = require("simple-storage");

// ====================================================================================
// BZPage's methods

var BZPage = function BZPage(doc, config) {
    // initialize dynamic properties
    this.doc = doc;    
    console.log("Now we are inside!");
    console.log("this = " + this);
};

BZPage.prototype.getURL = function getURL () {
    console.log("url = " + this.doc.location.href);
    return this.doc.location.href;
};

BZPage.prototype.getBugId = function getBugId () {
    return util.getBugNo(this.doc.location.href);
};

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