RetroZilla/extensions/inspector/resources/content/venkmanOverlay.xul

35 lines
860 B
Plaintext
Raw Normal View History

2015-10-21 05:03:22 +02:00
<?xml version="1.0"?>
<overlay id="ovVenkman"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://inspector/content/hooks.js"/>
<script type="application/x-javascript"><![CDATA[
window.addEventListener("load", InspectorVenkmanOnLoad, false);
function InspectorVenkmanOnLoad()
{
console._commands.add("inspect", "onInputInspect", "<object>", "Inspect somethin', yo.");
}
console.onInputInspect = function (e)
{
var v = evalInTargetScope (e.inputData);
if (!(v instanceof jsdIValue) || v.jsType != jsdIValue.TYPE_OBJECT)
{
var str = (v instanceof jsdIValue) ? formatValue(v) : String(v)
display (getMsg(MSN_ERR_INVALID_PARAM, [MSG_VAL_EXPR, str]),
MT_ERROR);
return false;
}
inspectObject(v);
}
]]></script>
</overlay>