Help.Web/editor/scripts/moz/box.htm
(开头部分) 34KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../style/editor.css" rel="stylesheet" type="text/css">
<script>
var sLangDir=window.opener.oUtil.langDir;
document.write("<scr"+"ipt src='../language/"+sLangDir+"/box.js'></scr"+"ipt>");
</script>
<script language="JavaScript" src="color_picker.js"></script>
<script>writeTitle()</script>
<script>
var dialogArgument=['window.opener', 'window.opener'];
var activeModalWin;
function doWindowFocus()
{
window.opener.oUtil.onSelectionChanged=new Function("realTime()");
}
function bodyOnLoad()
{
window.onfocus=doWindowFocus;
window.opener.oUtil.onSelectionChanged=new Function("realTime()");
realTime();
}
function realTime()
{
var oEditor=window.opener.oUtil.oEditor;
var oSel=oEditor.getSelection();
var oElement;
if(window.opener.oUtil.activeElement)
{
oElement=window.opener.oUtil.activeElement
}
else
{
oElement = window.opener.getSelectedElement(oSel);
}
document.getElementById("inpMarginLeft").value=(oElement.style.marginLeft!=null?oElement.style.marginLeft.replace(/\D+/gi, ""):"");
document.getElementById("inpMarginRight").value=(oElement.style.marginRight!=null?oElement.style.marginRight.replace(/\D+/gi, ""):"");
document.getElementById("inpMarginTop").value=(oElement.style.marginTop!=null?oElement.style.marginTop.replace(/\D+/gi, ""):"");
document.getElementById("inpMarginBottom").value=(oElement.style.marginBottom!=null?oElement.style.marginBottom.replace(/\D+/gi, ""):"");
document.getElementById("inpPaddingLeft").value=(oElement.style.paddingLeft!=null?oElement.style.paddingLeft.replace(/\D+/gi, ""):"");
document.getElementById("inpPaddingRight").value=(oElement.style.paddingRight!=null?oElement.style.paddingRight.replace(/\D+/gi, ""):"");
document.getElementById("inpPaddingTop").value=(oElement.style.paddingTop!=null?oElement.style.paddingTop.replace(/\D+/gi, ""):"");
document.getElementById("inpPaddingBottom").value=(oElement.style.paddingBottom!=null?oElement.style.paddingBottom.replace(/\D+/gi, ""):"");
var inpWidth = document.getElementById("inpWidth");
var inpHeight = document.getElementById("inpHeight");
var inpAutoFitMeasure1 = document.getElementById("inpAutoFitMeasure1");
var inpAutoFitMeasure2 = document.getElementById("inpAutoFitMeasure2");
if(oElement.style.width == "")inpWidth.value="";
if(oElement.style.width.substr(oElement.style.width.length-2,2)=="px")
{
inpAutoFitMeasure1.value = "px";
inpWidth.value = oElement.style.width.substr(0,oElement.style.width.length-2);
}
后面还有 680 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
