mit Inspect Window kann ich glaub ich mtw. weiter helfen.
Lass das Script nicht über den Loader in die chrome.js einbinden, sondern schreib es direkt in diese. Bei mir hats dann damit geklappt:
Code
(function() {
if(typeof inspectDOMDocument != "function") {
var errMsg = "inspectChrome: DOM Inspector is not installed" +
"or is disabled";
throw new Error(errMsg);
return;
}
var inspectMenu = document.createElement("menu");
inspectMenu.setAttribute("label", "Inspect a Window");
var windowList = inspectMenu.appendChild(document.createElement("menupopup"));
windowList.id = "inspect-window-list";
windowList.setAttribute("onpopupshowing", "inspectWindow.showList(this);");
windowList.setAttribute("oncommand", "inspectWindow.inspect(event);");
var inspectItem = document.getElementById("menu_inspector");
inspectItem.parentNode.insertBefore(inspectMenu, inspectItem.nextSibling);
})();
var inspectWindow = {
showList: function(aNode) {
while(aNode.lastChild) aNode.removeChild(aNode.lastChild);
var index = 1;
var enumerator = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher)
.getWindowEnumerator();
while(enumerator.hasMoreElements()) {
var win = enumerator.getNext();
var mi = aNode.appendChild(document.createElement("menuitem"));
mi.setAttribute("label", index + " " + win.document.title);
mi.setAttribute("accesskey", index);
mi.tooltipText = win.location;
mi.value = index++;
}
},
inspect: function(aEvent) {
var windowIndex = parseInt(aEvent.target.value);
var enumerator = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher)
.getWindowEnumerator();
var index = 1;
while(enumerator.hasMoreElements()) {
var win = enumerator.getNext();
if(index++ == windowIndex) {
inspectDOMDocument(win.document);
return;
}
}
}
}
Alles anzeigen
Wat bis jetzt noch nicht richtig will (hab da auch schon etwas dran rum geschraubt, aber bis jetzt leider erfolglos) sind: Element Inspector und Edit userchrome.js