不是插overlay的丫。。
是用更dirty的方法写的。。
我的确不知道这儿该怎么写好了,毕竟原来firebug的这个菜单就是非常hardcoded的了,我也只好hard对hard了……=.=b
for (var i in Firebug.reps) {
if (Firebug.reps[i].className == "element") {
Firebug.reps[i].getContextMenuItems = function(elt, target, context){
var monitored = areEventsMonitored(elt, null, context);
return [{
label: "CopyHTML",
command: bindFixed(this.copyHTML, this, elt)
}, {
label: "CopyInnerHTML",
command: bindFixed(this.copyInnerHTML, this, elt)
}, {
label: "CopyXPath",
command: bindFixed(this.copyXPath, this, elt)
}, "-", {
label: "ShowEventsInConsole",
type: "checkbox",
checked: monitored,
command: bindFixed(toggleMonitorEvents, FBL, elt, null, monitored, context)
}, "-", {
label: "ScrollIntoView",
command: bindFixed(elt.scrollIntoView, elt)
}, {
label: "Dump CSS",
command: bindFixed(CSSDumpRefiner.dumpCSS, CSSDumpRefiner, elt)
}];
}
}
}
【 在 zms (来福) 的大作中提到: 】
: 没看到你的dump的菜单
: 我也插过 firebox,也是在 html的页的dom的右键上加了个菜单
: 用的办法 好像不是简单的overlay一下搞定的
: ...................
--
FROM 202.108.12.36