Help.Web/editor/scripts/moz/styles_cssText.htm

(开头部分) 9KB

这里只显示每个文件的开头 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+"/styles_cssText.js'></scr"+"ipt>");
</script>
<script>writeTitle()</script>
<script>
function doWindowFocus()
    {   
    window.opener.oUtil.onSelectionChanged=new Function("realTime()");
    }
    
function bodyOnLoad()
    {
    var idPreview = document.getElementById("idPreview").contentWindow;
    
    window.onfocus=doWindowFocus;
    window.opener.oUtil.onSelectionChanged=new Function("realTime()");

    var obj=window.opener.oUtil.obj;
    
    arrStyle = obj.arrStyle;
    var sStyle=""
    for(var i=0;i<arrStyle.length;i++)
        {
        sStyle+=arrStyle[i][0]+"{"+ arrStyle[i][3]+"}"+ "\n"
        }           
        
    var sHTML="<HTML><HEAD><STYLE>"+sStyle+"</STYLE></HEAD><BODY margin-left=0 margin-top=0 margin-right=0 margin-bottom=0' id=idPreviewTarget></BODY></HTML>"
    var oDoc=idPreview.document.open("text/html", "replace");
    if(obj.publishingPath!="") oDoc.write("<BASE HREF=\""+obj.publishingPath+"\"/>" + sHTML);
    else oDoc.write(sHTML);     
    oDoc.close();
            
    realTime()
    }
    
function realTime()
    {
    var idPreview = document.getElementById("idPreview").contentWindow;
    var inpCssText = document.getElementById("inpCssText");
    var inpClassName = document.getElementById("inpClassName");
    var selApply_to = document.getElementById("selApply_to");
    
    var oEditor=window.opener.oUtil.oEditor;
    var oSel=oEditor.getSelection();
    var isTextSel = window.opener.isTextSelected(oSel);
    
    var oElement;
    if(window.opener.oUtil.activeElement)
        oElement=window.opener.oUtil.activeElement
    else
        oElement = window.opener.getSelectedElement(oSel);
    
    if (!isTextSel) selApply_to.value = "Current Tag";
    //selApply_to.value = (isTextSel) ? "Selected Text" : "Current Tag";
    
后面还有 175 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。