aboutsummaryrefslogtreecommitdiffstats
path: root/lib/logger.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-19 22:08:04 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-19 22:08:04 +0200
commit87b9c2d6d0a1bda477f15af227d758c5fc3e55e0 (patch)
tree1781a0d60ae99c783add1205722d49da3d2d4143 /lib/logger.js
parent76e764fb8e4f9d52dc92e97c6408c169142b104f (diff)
downloadbugzilla-triage-87b9c2d6d0a1bda477f15af227d758c5fc3e55e0.tar.gz
Loads a bug page without crash!!!
There is not jetpack. call in used modules.
Diffstat (limited to 'lib/logger.js')
-rw-r--r--lib/logger.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/logger.js b/lib/logger.js
index ad7f4e9..3a534d4 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -4,6 +4,7 @@
var urlMod = require("url");
var urilMod = require("util");
var Color = require("color").Color;
+var tabs = require("tabs");
var Logger = exports.Logger = function Logger(store, abbsMap) {
this.EmptyLogsColor = new Color(0, 255, 0);
@@ -18,7 +19,7 @@ Logger.prototype.addLogRecord = function(that) {
rec.date = new Date();
rec.url = that.doc.location.toString();
rec.title = that.title;
- var comment = jetpack.tabs.focused.contentWindow.prompt(
+ var comment = tabs.activeTab.contentWindow.prompt(
"Enter comments for this comment");
if (comment && comment.length > 0) {
comment = comment.trim();
@@ -38,7 +39,6 @@ Logger.prototype.addLogRecord = function(that) {
} else {
this.store[recKey] = rec;
}
- jetpack.storage.simple.sync();
}
return comment;
};
@@ -98,13 +98,14 @@ Logger.prototype.createBlankPage = function (ttl, bodyBuildCB) {
var title = ttl || "Yet another untitled page";
var that = this;
- var logTab = jetpack.tabs.open("about:blank");
- jetpack.tabs.onReady(function() {
- var otherDoc = logTab.contentDocument;
- otherDoc.title = title;
- otherDoc.body.innerHTML = "<h1>" + title + "</h1>";
- bodyBuildCB.call(that, otherDoc.body);
- logTab.focus();
+ var logTab = tabs.open({
+ url: "about:blank",
+ onOpen: function (tab) {
+ var otherDoc = tab.contentDocument;
+ otherDoc.title = title;
+ otherDoc.body.innerHTML = "<h1>" + title + "</h1>";
+ bodyBuildCB.call(that, otherDoc.body);
+ }
});
};