JS代码格式化和语法着色V2_javascript技巧_脚本之家

升级到第二版,开一贴以示庆贺,哈哈哈 自Ver1.1升级内容 1.增加函数列表
2.增加函数Export功能
3.增加函数依存关系分析(这个功能个人未见其他软件实现过,自己创意,问题多多,目前分析能力还是比较有限的,只能分析全局函数依存关系,可能在复杂代码的情况下出现bug)
4.修正for语句分析bug 5.修正语法折叠的bug
6.改进CollapseAll※ExpandAll函数工作方式,避免行数太大时的死机
7.改进行号分析机制,避免行数太大时的死机 复制代码 代码如下:

JSerVer2.0

/********************** Author:Hutia
*********************/ window.onload=init;
//—————— //StaticVariable //——————
varKEYWORDS=”abstractbreakbytecasecatchcharclassconstcontinuedefaultdeletedodoubleelseextendsfalsefinal
finallyfloatforfunctiongotoifimplementsimportininstanceofintinterfacelongnativenullpackageprivateprotected
publicresetreturnshortstaticsuperswitchsynchronizedthisthrowtransienttruetryvarvoidwhilewith”;
varOBJECTS=”AnchorAppletAreaArgumentsArrayBooleanButtonCheckboxCollectionCryptoDateDictionaryDocumentDrive
DrivesElementEnumeratorEventFileFileObjectFileSystemObjectFileUploadFolderFoldersFormFrameFunctionGlobalHidden
HistoryHTMLElementImageInfinityInputJavaArrayJavaClassJavaObjectJavaPackageJSObjectLayerLinkMathMimeType
NavigatorNumberObjectOptionPackagesPasswordPluginPrivilegeManagerRandomRegExpScreenSelectStringSubmitText
TextareaURLVBArrayWindowWScript”;
varMETHODS_PROPERTIES=”aboveabsacosactionactiveElementalertalinkColorallaltKeyanchoranchorsappCodeNameapplets
applyappNameappVersionargumentsarityasinassignatanatan2atobavailHeightavailLeftavailTopavailWidthActiveXObject
backbackgroundbelowbgColorbigblinkblurboldborderborderWidthsbottombtoabuttoncallcalleecallercancelBubble
captureEventsceilcharAtcharCodeAtcharsetcheckedchildrenclassesclassNameclearclearIntervalclearTimeoutclick
clientInformationclientXclientYcloseclosedcolorDepthcompilecompleteconcatconfirmconstructircontainscontextual
cookiecoscryptoctrlKeycurrentdatadefaultCharsetdefaultCheckeddefaultSelecteddefaultStatusdefaultValuedescription
disableExternalCapturedisablePrivilegedocumentdomainEEchoelementelementsembedsenabledPluginenableExternalCapture
enablePrivilegeencodingescapeevaleventexecexpexpandoFromPointfgColorfileNamefindfixedfloorfocusfontColor
fontSizeformformsforwardframesfromCharCodefromElementgetAttributegetgetClassgetDategetDaygetFullYeargetHours
getMembergetMillisecondsgetMinutesgetMonthgetSecondsgetSelectiongetSlotgetTimegetTimezoneOffsetgetUTCDategetUTCDay
getUTCFullYeargetUTCHoursgetUTCMillisecondsgetUTCMinutesgetUTCMonthgetUTCSecondsgetWindowgetYearglobalgoHandleEvent
HeighthashhiddenhistoryhomehosthostNamehrefhspaceididsignoreCaseimagesindexindexOfinnerinnerHTMLinnerText
innerWidthinsertAdjacentHTMLinsertAdjacentTextisFiniteisNANitalicsjavajavaEnabledjoinkeyCodeLinksLN10LN2LOG10E
LOG2ElanglanguagelastIndexlastIndexOflastMatchlastModifiedlastParenlayerslayerXlayerYleftleftContextlengthlink
linkColorloadlocationlocationBarloglowsrcMAX_VALUEMIN_VALUEmarginsmatchmaxmenubarmethodmimeTypesminmodifiers
moveAbovemoveBelowmoveBymoveTomoveToAbsolutemultilineNaNNEGATIVE_INFINITYnamenavigatenavigatornetscapenext
numberoffscreenBufferingoffsetoffsetHeightoffsetLeftoffsetParentoffsetTopoffsetWidthoffsetXoffsetYonabortonblur
onchangeonclickondblclickondragdroponerroronfocusonHelponkeydownonkeypressonkeyuponloadonmousedownonmousemove
onmouseoutonmouseoveronmouseuponmoveonresetonresizeonsubmitonunloadopenopeneroptionsouterHeightouterHTML
outerTextouterWidthPOSITIVE_INFINITYPIpaddingspageXpageXOffsetpageYpageYOffsetparentparentElementparentLayer
parentWindowparseparseFloatparseIntpathnamepersonalbarpixelDepthplatformpluginspopportpowpreferenceprevious
printpromptprotocolprototypepushrandomreadyStatereasonreferrerrefreshreleaseEventsreloadremoveAttribute
removeMemberreplaceresizeByresizeToreturnValuereverserightrightcontextroundSQRT1_2SQRT2screenXscreenYscroll
scrollbarsscrollByscrollIntoViewscrollTosearchselectselectedselectedIndexselfsetAttributesetDaysetFullYear
setHotkeyssetHourssetIntervalsetMembersetMillisecondssetMinutessetMonthsetResizablesetSecondssetSlotsetTime
setTimeoutsetUTCDatesetUTCFullYearsetUTCHourssetUTCMillsecondssetUTCMinutessetUTCMonthsetUTCSecondssetYear
setZOptionsshiftshiftKeysiblingAbovesiblingBelowsignTextsinslicesmallsortsourcesourceIndexsplicesplitsqrtsrc
srcElementsrcFilterstatusstatusbarstopstrikestylesubsubmitsubstrsubstringsuffixessunsupsystemLanguageTYPE
tagNametagstainttaintEnabledtantargettesttexttitletoElementtoGMTStringtoLocaleStringtoLowerCasetoolbartop
toStringtoUpperCasetoUTCStringtypetypeOfUTCunescapeunshiftuntaintunwatchuserAgentuserLanguagevaluevalueOf
visibilityvlinkColorvspacewatchwhichwidthwindowwritewritelnxyzIndex”;
varOPS=”!$%&*+-///:<=>?[]^|~isnewsizeoftypeofunchecked”;
varregKW=newRegExp(“(\\W”+KEYWORDS.replace”,”g”);
varregObj=newRegExp(“(\\W”+OBJECTS.replace”,”g”);
varregMP=newRegExp(“(\\W”+METHODS_PROPERTIES.replace”,”g”);
//varregOP=newRegExp(“(\\W”+OPS.replace”,”g”); //——————
//GlobalVariables //——————
vardivJSInput,txtJSInput,divMain,divJSOutputLineNo,divJSOutputPlus,divJSOutput,divWaiting;
varspnProcess,cmdStop,divJSExport,selJSExport,divJSExportContent;
varglbStr,glbP,glbRe,curRe,glbTimer,glbBusy,glbFuntionNames;
functioninit(){ //initglobalvariables
divJSInput=document.getElementById; txtJSInput=document.getElementById;
divMain=document.getElementById;
divJSOutputLineNo=document.getElementById;
divJSOutputPlus=document.getElementById;
divJSOutput=document.getElementById; divWaiting=document.getElementById;
spnProcess=document.getElementById; cmdStop=document.getElementById;
divJSExport=document.getElementById;
selJSExport=document.getElementById;
divJSExportContent=document.getElementById; //initwindowstate
maximizeWindow(); divMain.style.width=document.body.clientWidth-4;
divMain.style.height=document.body.clientHeight-26;
divJSOutput.style.width=document.body.clientWidth-72; //initglobalevents
divJSOutputLineNo.onselectstart=divJSOutputLineNo.onselect=divJSOutputPlus.onselectstart=divJSOutputPlus.onselect=cancelEvent
divJSOutput.onscroll=divJSOutput_onscroll;
divJSInput.onkeydown=divJSInput_keydown;
divJSExport.onkeydown=divJSExport_keydown; } //——————
//eventscripts //—————— functioncancelEvents{
vare=window.event?window.event:e; e.returnValue=false; return; }
functiondivJSInput_keydown{ vare=window.event?window.event:e;
varsrcEle=e.srcElement?e.srcElement:e.target; varsel; ifhideJSInput();
if(e.keyCode==13&&e.ctrlKey)execJSInput();
if(e.keyCode==9&&srcEle==txtJSInput){
document.selection.createRange().text=”\t”;return;//notsupportFF } }
functiondivJSExport_keydown{ vare=window.event?window.event:e;
varsrcEle=e.srcElement?e.srcElement:e.target; varsel; ifhideJSExport();
if(e.keyCode==13&&e.ctrlKey)hideJSExport(); }
functiondivJSOutput_onscroll(){
divJSOutputLineNo.scrollTop=divJSOutputPlus.scrollTop=divJSOutput.scrollTop;
} //—————— //functionalscripts //——————
functionshowJSInputreturn; hideJSExport(); with{ display=”block”;
left=(document.body.clientWidth-divJSInput.offsetWidth)/2;
top=(document.body.clientHeight-divJSInput.offsetHeight)/2; }
txtJSInput.focus; } functionshowJSExportreturn; hideJSInput(); with{
display=”block”;
left=(document.body.clientWidth-divJSExport.offsetWidth)/2;
top=(document.body.clientHeight-divJSExport.offsetHeight)/2; }
divJSExportContent.style.display=”none”;
selJSExport.style.display=”block”; selJSExport.focus; }
functionhideJSInput(){ divJSInput.style.display=”none”; }
functionhideJSExport(){ divJSExport.style.display=”none”; }
functionexecJSInput; divJSOutput.innerHTML=””;
divJSOutputLineNo.innerHTML=””; divJSOutputPlus.innerHTML=””;
glbStr=txtJSInput.innerText;//notsupportFF glbP=0;
glbFuntionNames=newArray(); curRe=glbRe=document.createElement;
divJSOutput.appendChild; glbRe.className=”codeRoot”;
while(selJSExport.options.length>0)selJSExport.options[0]=null;
showWait; core_analysis(); } functionexecJSExport,fcs=newArray(),str;
for(vari=0;idivJSOutputPlus.buttons.length)return;
for(vari=index;idivJSOutputPlus.buttons.length)return;
for(vari=index;i”+htmlEncode(glbStr.substring+”\””; i=intNextQuote;
lastState=””; break; case”\'”: intNextQuote=i;
while(intNextQuote!=-1&&intNextQuote”+htmlEncode(glbStr.substring+”\'”;
i=intNextQuote; lastState=””; break; case”\/”: if==”\/”){
intNextQuote=i; intNextQuote=glbStr.indexOf(“\r\n”,intNextQuote+1);
ifintNextQuote=glbStr.length; str=str.substring;
str+=”\/”+htmlEncode(glbStr.substring +””; i=intNextQuote;
}elseif==”*”){ intNextQuote=i; intNextQuote=glbStr.indexOf; ifreturn;
str=str.substring; str+=”\/”+htmlEncode(glbStr.substring +”*\/”;
i=intNextQuote+1; }elseif(str.match{ intNextQuote=i;
while(intNextQuote!=-1&&intNextQuote”+htmlEncode(glbStr.substring
+”\/”; i=intNextQuote; lastState=””; } lastState=””; break; case”{“:
outputLn; str=””; seq=document.createElement; seq.className=”indent”;
curRe.appendChild; curRe=seq; lastState=”\r\n”; if{ glbP=i+1;
glbTimer=setTimeout; return; } break; case”}”: outputLn(str.substring;
str=”}”; lastState=””; curRe=curRe.parentNode; break; default:
if&&glbStr.charAt{intWordStart=i;} if&&glbStr.charAt{
str=str.substring(0,str.length-htmlEncode;
str=str.replace.replace.replace+htmlEncode; } lastState=””; break; } }
if{ if{outputLn;str=””;} stopExec(); } } functionoutputLn{
varseq,txt,fn; if.matchreturn; seq=document.createElement;
seq.innerHTML=theStr; curRe.appendChild; txt=html2txtreturn;
fn=txt.match(/function[\t\r\n]+[\t\r\n]*\; if{
glbFuntionNames.push;
selJSExport.options[selJSExport.options.length]=newOption;
selJSExport.options[selJSExport.options.length-1].obj=seq; }
fn=txt.match[\t\r\n]*=[\t\r\n]*function\W*\; if{
glbFuntionNames.push;
selJSExport.options[selJSExport.options.length]=newOption;
selJSExport.options[selJSExport.options.length-1].obj=seq; } }
functionclKW{return+””+str.substring;}
functionclObj{return+””+str.substring;}
functionclMP{return+””+str.substring;}
functionclOP{return+””+str.substring;} //——————
//globalscripts //—————— functionmaximizeWindow;
window.resizeTo(screen.availWidth,screen.availHeight); }
functionhtmlEncode{ return(strS.replace.replace.replace.replace.replace;
} functionhtml2txt{
return(strS.replace.replace.replace.replace.replace.replace; }

InputJS CollapseAll ExpandAll ExportJS

PleaseInputtheJS:

/********************** Author:Hutia
*********************永利皇宫463娱乐网址,/ window.onload=init;
//—————— //StaticVariable //—– ————-
varKEYWORDS=”abstractbreakbytecasecatchcharclasscons
tcontinuedefaultdeletedodoubleelseextendsfalsefinalfinallyf
loatforfunctiongotoifimplementsimportininstanceofintinterface&nbs
p;longnativenullpackageprivateprotectedpublicresetreturnshortstat
icsuperswitchsynchronizedthisthrowtransienttruetryvarvoidwh ilewith”;
varOBJECTS=”AnchorAppletAreaArgumentsArrayBoolean&nbsp
;ButtonCheckboxCollectionCryptoDateDictionaryDocumentDriveDrivesElement
EnumeratorEventFileFileObjectFileSystemObjectFileUploadFolderFoldersFor
mFrameFunctionGlobalHiddenHistoryHTMLElementImageInfinityInputJav
aArrayJavaClassJavaObjectJavaPackageJSObjectLayerLinkMathMimeTypeNaviga
torNumberObjectOptionPackagesPasswordPluginPrivilegeManagerRandomRegExp
ScreenSelectStringSubmitTextTextareaURLVBArrayWindowWScript” ;
varMETHODS_PROPERTIES=”aboveabsacosactionactiveElementalertalinkCol
orallaltKeyanchoranchorsappCodeNameappletsapplyappNameappVersiona
rgumentsarityasinassignatanatan2atobavailHeightavailLeftavailTop&
nbsp;availWidthActiveXObjectbackbackgroundbelowbgColorbigblinkblurbold&
nbsp;borderborderWidthsbottombtoabuttoncallcalleecallercancelBubblecapt
ureEventsceilcharAtcharCodeAtcharsetcheckedchildrenclassesclassNameclea
rclearIntervalclearTimeoutclickclientInformationclientXclientYcloseclos
edcolorDepthcompilecompleteconcatconfirmconstructircontainscontextualco
okiecoscryptoctrlKeycurrentdatadefaultCharsetdefaultCheckeddefaultSelected&nb
sp;defaultStatusdefaultValuedescriptiondisableExternalCapturedisablePrivilegedocumentdoma
inEEchoelementelementsembedsenabledPluginenableExternalCaptureenablePri
vilegeencodingescapeevaleventexecexpexpandoFromPointfgColorfileNa
mefindfixedfloorfocusfontColorfontSizeformformsforwardframes&nbsp
;fromCharCodefromElementgetAttributegetgetClassgetDategetDaygetFullYear
getHoursgetMembergetMillisecondsgetMinutesgetMonthgetSecondsgetSelectiongetSlot&nbs
p;getTimegetTimezoneOffsetgetUTCDategetUTCDaygetUTCFullYeargetUTCHoursgetUTCMillise
condsgetUTCMinutesgetUTCMonthgetUTCSecondsgetWindowgetYearglobalgoHandleEvent
HeighthashhiddenhistoryhomehosthostNamehrefhspaceidid
signoreCaseimagesindexindexOfinnerinnerHTMLinnerTextinnerWidthinsertAdj
acentHTMLinsertAdjacentTextisFiniteisNANitalicsjavajavaEnabledjoinkeyCode&nbs
p;LinksLN10LN2LOG10ELOG2ElanglanguagelastIndexlastIndexOflastMatc
hlastModifiedlastParenlayerslayerXlayerYleftleftContextlengthlink
linkColorloadlocationlocationBarloglowsrcMAX_VALUEMIN_VALUEmargins&nbsp
;matchmaxmenubarmethodmimeTypesminmodifiersmoveAbovemoveBelowmoveBy&nbs
p;moveTomoveToAbsolutemultilineNaNNEGATIVE_INFINITYnamenavigatenavigator&nbsp
;netscapenextnumberoffscreenBufferingoffsetoffsetHeightoffsetLeftoffsetParent
offsetTopoffsetWidthoffsetXoffsetYonabortonbluronchangeonclickondblclick&nbsp
;ondragdroponerroronfocusonHelponkeydownonkeypressonkeyuponloadonmoused
ownonmousemoveonmouseoutonmouseoveronmouseuponmoveonresetonresizeonsubmit&nbs
p;onunloadopenopeneroptionsouterHeightouterHTMLouterTextouterWidthPOSIT
IVE_INFINITYPIpaddingspageXpageXOffsetpageYpageYOffsetparentparentEleme
ntparentLayerparentWindowparseparseFloatparseIntpathnamepersonalbarpixelDepth
platformpluginspopportpowpreferencepreviousprintpromptproto
colprototypepushrandomreadyStatereasonreferrerrefreshreleaseEventsreloa
dremoveAttributeremoveMemberreplaceresizeByresizeToreturnValuereverseright&nb
sp;rightcontextroundSQRT1_2SQRT2screenXscreenYscrollscrollbarsscrollBy&
nbsp;scrollIntoViewscrollTosearchselectselectedselectedIndexselfsetAttributes
etDaysetFullYearsetHotkeyssetHourssetIntervalsetMembersetMillisecondssetMinut
essetMonthsetResizablesetSecondssetSlotsetTimesetTimeoutsetUTCDatesetUTCFullY
earsetUTCHourssetUTCMillsecondssetUTCMinutessetUTCMonthsetUTCSecondssetYearse
tZOptionsshiftshiftKeysiblingAbovesiblingBelowsignTextsinslicesmallsort
sourcesourceIndexsplicesplitsqrtsrcsrcElementsrcFilterstatusstatu
sbarstopstrikestylesubsubmitsubstrsubstringsuffixessunsupsy
stemLanguageTYPEtagNametagstainttaintEnabledtantargettesttext&nbs
p;titletoElementtoGMTStringtoLocaleStringtoLowerCasetoolbartoptoStringtoUpper
CasetoUTCStringtypetypeOfUTCunescapeunshiftuntaintunwatchuserAgent&nbsp
;userLanguagevaluevalueOfvisibilityvlinkColorvspacewatchwhichwidth&nbsp
;windowwritewritelnxyzIndex”; varOPS=”!$% &*+-///:<=>?[]
^|~isnewsizeoftypeofunchecked”; var
regKW=newRegExp(“(\\W”+KEYWORDS.replace| “,”g”);
varregObj=newRegExp(“(\\W”+OBJECTS.replace| “,”g”);
varregMP=newRegExp(” (\\W”+METHODS_PROPERTIES.replace| “,”g”);
//varregOP=newRegExp(“(\\W”+OPS.replace|”,”g”); //——————
//GlobalVariables //– —————-
vardivJSInput,txtJSInput,divMain,divJSOutputLineNo,divJSOutputPlus,divJSOutput,
divWaiting;
varspnProcess,cmdStop,divJSExport,selJSExport,divJSExportContent; 3;
varglbStr,glbP,glbRe,curRe,glbTimer,glbBusy,glbFuntionNames; & #10;
functioninit() { //initglobalvariables
divJSInput=document.getElementById (“divJSInput”);
txtJSInput=document.getElementById (“txtJSInput”);
divMain=document.getElementById ;
divJSOutputLineNo=document.getElementById (“divJSOutputLineNo”);
divJSOutputPlus=document.getElementById (“divJSOutputPlus”);
divJSOutput=document.getElementById (“divJSOutput”);
divWaiting=document.getElementById (“divWaiting”);
spnProcess=document.getElementById (“spnProcess”);
cmdStop=document.getElementById ; divJSExport=document.getElementById
(“divJSExport”); selJSExport=document.getElementById (“selJSExport”);
divJSExportContent=document.getElementById (“divJSExportContent”);
//initwindowstate maximizeW indow();
divMain.style.width=document.body.clientWidth- 4;
divMain.style.height=document.body.clientHeight- 26;
divJSOutput.style.width=document.body.clientWidth- 52;
//initglobalevents divJSOutputLineNo.onse
lectstart=divJSOutputLineNo.onselect=divJSOutputPlus.onselectstart=divJSOutputPlus.onselect=cancelEvents;
divJ SOutput.onscroll=divJSOutput_onscroll;
divJSInput.onkeydown=divJSInput_keydown; &nbsp
;divJSExport.onkeydown=divJSExport_keydown; } //——————
//eventscripts //—————— functioncancelEvents {
vare=window.event?window.event:e; e.returnValue=false; return ; }
functiondivJSInput_keydown{ vare=window.event? window.event:e;
varsrcEle=e.srcElement? e.srcElement:e.target; varsel; ifhideJSInput();
if (e.keyCode==13&&e.ctrlKey)execJSInput();
if(e.keyCode==9&&srcEle==txtJSInput) {
document.selection.createRange().text=”\t”;return ;//notsupportFF } }
functiondivJSExport_keydown{ vare=window.event? window.event:e;
varsrcEle=e.srcElement? e.srcElement:e.target; varsel; ifhideJSExport();
if (e.keyCode==13&&e.ctrlKey)hideJSExport(); }
functiondivJSOutput_onscroll() {
divJSOutputLineNo.scrollTop=divJSOutputPlus.scrollTop=divJSOutput.scrollTop;
} //—————— //functionalscripts //———– ——-
functionshowJSInput(){ ifreturn; hideJSExport (); with{ display=”block”;
left= (document.body.clientWidth-divJSInput.offsetWidth)/2;
top=(document.body.clientHeight- divJSInput.offsetHeight)/2; }
txtJSInput.focus (); return; } functionshowJSExport() { ifreturn;
hideJSInput(); with { display=”block”; left=(document.body.clientWidth-
divJSExport.offsetWidth)/2; top=(document.body.clientHeight-
divJSExport.offsetHeight)/2; } divJSExportContent.style.display=”none”;
selJSExport.style.display=”block” ; selJSExport.focus(); return; }
functionhideJSInput(){ divJSInput.style.display=”none”; }
functionhideJSExport(){ divJSExport.style.display=”none”; }
functionexecJSInput(){ hideJSInput (); divJSOutput.innerHTML=””;
divJSOutputLineNo.innerHTML=”&quot ;; divJSOutputPlus.innerHTML=””;
glbStr=txtJSInput.value; &n bsp;glbP=0; glbFuntionNames=newArray();
curRe=glbRe=document.createElement ; divJSOutput.appendChild ;
glbRe.className=”codeRoot”; while
(selJSExport.options.length>0)selJSExport.options[0]=null; showWait
; core_analysis(); } functionexecJSExport() { varfns=newArray,str; for
(vari=0;i\r\n”); } functionexecJSExport_Dep() {
varfns=newArray,str,regFNs=newArray (),needDepthTest; for(vari=0;i”+
+””; re2+=””; } divJSOutputLineNo.innerHTML=re;
divJSOutputPlus.innerHTML=re2; divJSOutputPlus.buttons=newArray();
glbP=0; showWait (); recalcLine(); return; } functionrecalcLine() {
varobjs,j; objs=document.getElementsByTagName ;
for(vari=glbP;idivJSOutputPlus.buttons.length)return; for
(vari=index;idivJSOutputPlus.buttons.length)return; for
(vari=index;i”+htmlEncode (glbStr.substring +”\””; i=intNextQuote;
lastSta te=””; break; case”\'”: intNextQuote=i;
while(intNextQuote!=-1&&intNextQuote”+htmlEncode (glbStr.substring
+”\'”; i=intNextQuote; lastState=&q uot;”; break; case”\/”: &nbsp
;if==”\/”) { intNextQuote=i; intNextQuote=glbStr.indexOf
(“\r\n”,intNextQuote+1); if intNextQuote=glbStr.length;
str=str.substring; str+=”\/”+htmlEncode (glbStr.substring +””;
i=intNextQuote; } elseif==”*”) { intNextQuote=i;
intNextQuote=glbStr.indexOf (“*\/”,intNextQuote+1); if return;
str=str.substring; str+=”\/”+htmlEncode (glbStr.substring +”*\/”;
i=intNextQuote+1; } elseif(str.match { intNextQuote=i;
while(intNextQuote!=- 1&&intNextQuote”+htmlEncode (glbStr.substring
+”\/”; i=intNextQuote; lastState=””; } lastState=””; break; case&n
bsp;”{“: outputLn ; str=””; seq=document.createElement ;
seq.className=”indent”; curRe. appendChild ; curRe=seq;
lastState=”\r\n”; &nbs p;if { glbP=i+1; glbTimer=setTimeout ; return;
} break; case”} “: outputLn(str.substring; str=”} “; lastState=””;
curRe=curRe.parentNod e; break; default: if
&&glbStr.charAt{intWordStart=i;} if &&glbStr.charAt{
str=str.substring(0,str.length-htmlEncode ;
str=str.replace.replace.replace +htmlEncode; } lastState=””; break; } }
if{ if {outputLn;str=””;} stopExec(); } } functionoutputLn {
varseq,txt,fn; if.match return; seq=document.createElement ;
seq.innerHTML=theStr; curRe.appendChild ; txt=html2txt; ifreturn;
fn=txt.match (/function[\t\r\n]+[\t\r\n]*\; if {
glbFuntionNames.push; selJSExport.options[selJSExport.options.length]
=newOption(fn[0]+”}”,fn[1]);
selJSExport.options[selJSExport.options.length- 1].obj=seq; }
fn=txt.match[\t\r\n]*=[\t\r\n]*function\W*\; if{
glbFuntionNames.push;
selJSExport.options[selJSExport.options.length]=newOption(fn[0]+”}”,fn
[1]); selJSExport.options[selJSExport.options.length-1].obj=seq; } }
functionclKW{return +””+str.substring+””);} functionclObj{return
+””+str.substring+””);} functionclMP{return +””+str.substring+””);}
functionclOP{return +””+str.substring+””);} //——————
//globalscripts //—————— functionmaximizeWindow(){
window.moveTo; window.resizeTo (screen.availWidth,screen.availHeight); }
functionhtmlEncode{ return
(strS.replace(/&/g,”&”).replace(//g,”>”).replace(//g,” “).replace(/
\r\n/g,”
“)); } functionhtml2txt{ return
(strS.replace(/<.>/g,””).replace(/</g,””).replace(/ /g,””).replace(/
/g,”\r\n”).replace (/&/g,”&”)); }

FunctionList:

Processing…

发表评论

电子邮件地址不会被公开。 必填项已用*标注