Help.Web/editor/color_picker_fg.htm

(开头部分) 24KB

这里只显示每个文件的开头 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=dialogArguments[0].oUtil.langDir;
	document.write("<scr"+"ipt src='language/"+sLangDir+"/color.js'></scr"+"ipt>");
</script>
<script>writeTitle()</script>
<script>
//******* COLOR ARRAY *********
var dialogArg=dialogArguments[0];
var sName=dialogArguments[1];//color object name

var arrColCustoms = eval("dialogArg."+sName).customColors;

//******* REAL TIME (CUSTOM) *********
function doWindowFocus()
	{
	dialogArg.oUtil.onSelectionChanged=new Function("realTime()");
	}
function bodyOnLoad()
	{	
	window.onfocus=doWindowFocus;	
	dialogArg.oUtil.onSelectionChanged=new Function("realTime()");
	realTime()
	}
function realTime()
	{
	if(!dialogArg.oUtil.obj.checkFocus()){return;}//Focus stuff
	var oEditor=dialogArg.oUtil.oEditor;
	if(oEditor.document.queryCommandEnabled("ForeColor"))
		{
		if(oEditor.document.queryCommandValue("ForeColor")!=null)
			{
			sHex=convertDecToHex2(oEditor.document.queryCommandValue("ForeColor"))
			//alert(sHex)//cccccc
			idCurrent.style.backgroundColor=sHex;
			//alert(idCurrent.style.backgroundColor)//#cccccc
			nRed=convertHexToDec(idCurrent.style.backgroundColor.substr(1,2));
			nGreen=convertHexToDec(idCurrent.style.backgroundColor.substr(3,2));
			nBlue=convertHexToDec(idCurrent.style.backgroundColor.substr(5,2));
			if(idCurrent.style.backgroundColor=="")
				{
				nRed="";nGreen="";nBlue="";
				}
			idCurrent.title = "Red: "+nRed+"\nGreen: "+nGreen+"\nBlue: "+nBlue+"\nHex: "+idCurrent.style.backgroundColor;
			}
		}
	}

//******* APPLY COLOR (CUSTOM) *********
function doApply()
	{
	if(!dialogArg.oUtil.obj.checkFocus()){return;}//Focus stuff
	var oEditor=dialogArg.oUtil.oEditor;
	var oSel=oEditor.document.selection.createRange();
	
	dialogArg.oUtil.obj.saveForUndo();
	
后面还有 451 行代码,解锁后查看完整代码

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

AI 解读

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

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