Author: Jan Odvarko, www.janodvarko.cz

/*
 * Author: Jan Odvarko, www.janodvarko.cz
 */

FBL.ns(function() { with (FBL) {

function HelloWorldPanel() {}
HelloWorldPanel.prototype = extend(Firebug.Panel,
{
    name: "HelloWorld",
    title: "Hello World!",

    initialize: function() {
      Firebug.Panel.initialize.apply(this, arguments);
    
    },
    getOptionsMenuItems: function(context)    {
        return [{
            label: "My Menu Item",
            nol10n: true,
            type: "checkbox",
            command: function() {
                //alert(content.document.title);
                  var doc = content.document;
                  //alert(doc.location);
                  var bodyNodes = doc.getElementsByTagName("body");
                  for (var i = 0, n = bodyNodes.length; i < n; i++) {
                    var imageNode = bodyNodes[i];
                    alert("<body>"+imageNode.innerHTML+"</body>");
                    imageNode.innerHTML +="ccccccccccccc";
                  }
            }
        }];
    }
});

Firebug.registerPanel(HelloWorldPanel);

}});

posted @ 2013-12-13 18:07  陈生伟笔记  阅读(128)  评论(0编辑  收藏  举报