FBL.ns(function() { with (FBL) {
const CLASS_ID = Components.ID("{5AAEB534-FA57-488d-9A73-20C258FC7BDB}");
const CLASS_NAME = "Firebug Channel Listener";
const CONTRACT_ID = "@joehewitt.com/firebug-channel-listener;1";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
var FBTrace = {DBG_FAKE: "fake"};
function swiftPanel() {}
var spanel=null;
var SwiftConsoleListener =
{
log: function(context, object, className, sourceLink)
{
},
logFormatted: function(context, objects, className, sourceLink)
{
},
logRowCreated: function(arr)
{
alert("log rwo");
}
};
swiftPanel.prototype = extend(Firebug.Panel,
{
name: "swift",
title: "Swift",
initialize: function() {
spanel=this;
if (FBTrace.DBG_FAKE) // cause the detrace to remove this statement and check for cached tracer
{
var tracerService=Cc["@joehewitt.com/firebug-trace-service;1"].getService(Ci.nsISupports)
.wrappedJSObject;
FBTrace = tracerService.getTracer("extensions.firebug");
FBTrace.sysout("Initialize swift extension !!!");
}
Firebug.Console.addListener(SwiftConsoleListener);
Firebug.Panel.initialize.apply(this, arguments);
}
});
Firebug.swiftModel = extend(Firebug.A11yModel,
{
initialize: function(){
Firebug.A11yModel.initialize.apply(this, arguments);
},
showPanel: function(browser, panel) {
var isswiftPanel = panel && panel.name == "swift";
var swiftButtons = browser.chrome.$("fbswiftButtons");
collapse(swiftButtons, !isswiftPanel);
if (!isswiftPanel) return;
var doc = panel.document;
var swift_div = panel.panelNode;
//Firebug.ConsoleBase.log("Logging firebug");
if (!this.initialized) {
var t = doc.createTextNode('I am the Swift extension and I approved this message.');
swift_div.appendChild(t);
this.initialized = true;
}
},
onLogRowCreated:function(panel,row)
{
alert('onlogrow');
},
onAboutButton: function(context) {
alert("Swift extension by Ravindra; http://www.snapfish.com");
}
});
Firebug.registerPanel(swiftPanel);
Firebug.registerModule(Firebug.swiftModel);
}});