- 浏览: 438764 次
- 性别:
文章分类
最新评论
-
yhang:
Spring配合实现Java循环任务 -
lonelybug:
任何事物没有100%可靠性,难道说你自己建设的服务器在公司内就 ...
37signals也能down成这样 ? -
siemens800:
你那创建很多个系统登陆用户关联了cvs , 这怎么行?一般不这 ...
centos5中安装cvs服务器 -
carmark:
我在做的时候有问题,需要将disable设置成0才可以通过。
centos5中安装cvs服务器 -
allen_java:
nba黑人多,姚明和黑人打交道的多,有点口音正常!
大姚的英文有点黑人口音呀,哈!!
最近碰到了一个问题,需要给FCKEditor增加视频上传功能,想要好好研究一下fckeditor的代码。可是fckeditor的作者给debug他们的代码增加了一个小门槛,有两个关键的js文件,fckeditorcode_gecko.js和fckeditorcode_ie.js被压缩了。可读性和可debug性都非常差 。
也找了几个js的格式化工具,如Javascript code improver, sourceformatx等,但是效果都不好。
有没有同学知道好用的javascript格式化工具,可以推荐给我的,非常感谢 !
JavaScript Code Improver会
1、把function与function之间保留的一个换行去掉了,比较讨厌!
2、把一些注释也给删除了!
也找了几个js的格式化工具,如Javascript code improver, sourceformatx等,但是效果都不好。
有没有同学知道好用的javascript格式化工具,可以推荐给我的,非常感谢 !
评论
9 楼
YuLimin
2007-05-20
dazuiba 写道
http://www.jcay.com/javascript-code-improver.html
很好用,免费的。去年用这个东西研究过baidu的歌词同步。
很好用,免费的。去年用这个东西研究过baidu的歌词同步。
JavaScript Code Improver会
1、把function与function之间保留的一个换行去掉了,比较讨厌!
2、把一些注释也给删除了!
8 楼
jindw
2007-05-18
JSA 也可以格式化:
http://www.iteye.com/article/77776
http://www.iteye.com/article/77776
7 楼
dazuiba
2007-05-18
http://www.jcay.com/javascript-code-improver.html
很好用,免费的。去年用这个东西研究过baidu的歌词同步。
很好用,免费的。去年用这个东西研究过baidu的歌词同步。
6 楼
sp42
2007-02-12
Aptana doesn't support feature of fomatting code
5 楼
sweetsweat
2007-02-11
好,学习到不少东西
4 楼
daoger
2007-02-08
codeutil 给出的示例文件长的吓人,往下拉都有点累眼!
3 楼
pupi
2007-02-07
thanks to all
用idea 6.03的格式化功能,正确解压缩了。
用idea 6.03的格式化功能,正确解压缩了。
2 楼
BIGN
2007-02-07
Aptana IDE也不错哦
http://www.aptana.org/
http://www.aptana.org/
1 楼
codeutil
2007-02-07
下面是idea 6.0 格式化的效果,如果可以接受的话,可以用这个试一下:
var FCKDebug = new Object(); if (FCKConfig.Debug) { FCKDebug.Output = function(A, B, C) { if (!FCKConfig.Debug) return; if (!C && A != null && isNaN(A)) A = A.replace(/</g, "<"); if (!this.DebugWindow || this.DebugWindow.closed) this.DebugWindow = window.open(FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=no,resizable=yes,location=no,toolbar=no,width=600,height=500', true); if (this.DebugWindow.Output) { try { this.DebugWindow.Output(A, B); } catch (e) { } ; } ; }; FCKDebug.OutputObject = function(A, B) { var C; if (A != null) { C = 'Properties of: ' + A + '</b><blockquote>'; for (var D in A) { var E = A[D] ? A[D] + '' : '[null]'; try { C += '<b>' + D + '</b> : ' + E.replace(/</g, '<') + '<br>'; } catch (e) { C += '<b>' + D + '</b> : [' + typeof(A[D]) + ']<br>'; } ; } ; C += '</blockquote><b>'; } else C = 'OutputObject : Object is "null".'; FCKDebug.Output(C, B, true); }; } else { FCKDebug.Output = function() { }; FCKDebug.OutputObject = function() { }; } var FCKTools = new Object(); FCKTools.GetLinkedFieldValue = function() { return FCK.LinkedField.value; }; FCKTools.AttachToLinkedFieldFormSubmit = function(A) { var B = FCK.LinkedField.form; if (!B) return; if (FCKBrowserInfo.IsIE) B.attachEvent("onsubmit", A); else B.addEventListener('submit', A, true); if (!B.updateFCKeditor) B.updateFCKeditor = new Array(); B.updateFCKeditor[B.updateFCKeditor.length] = A; if (!B.originalSubmit && (typeof(B.submit) == 'function' || (!B.submit.tagName && !B.submit.length))) { B.originalSubmit = B.submit; B.submit = FCKTools_SubmitReplacer; } ; }; function FCKTools_SubmitReplacer() { if (this.updateFCKeditor) { for (var i = 0; i < this.updateFCKeditor.length; i++) this.updateFCKeditor[i](); } ; this.originalSubmit(); } ; FCKTools.AddSelectOption = function(A, B, C, D) { var E = A.createElement("OPTION"); E.text = C; E.value = D; B.options.add(E); return E; }; FCKTools.HTMLEncode = function(A) { if (!A) return ''; A = A.replace(/&/g, "&"); A = A.replace(/"/g, """); A = A.replace(/</g, "<"); A = A.replace(/>/g, ">"); A = A.replace(/'/g, "'"); return A; }; FCKTools.GetElementPosition = function(A, B) { var c = { X:0,Y:0 }; var C = B || window; while (A) { c.X += A.offsetLeft; c.Y += A.offsetTop; if (A.offsetParent == null) { var D = FCKTools.GetElementWindow(A); if (D != C) A = D.frameElement; else break; } else A = A.offsetParent; } ; return c; }; FCKTools.GetElementAscensor = function(A, B) { var e = A; var C = "," + B.toUpperCase() + ","; while (e) { if (C.indexOf("," + e.nodeName.toUpperCase() + ",") != -1) return e; e = e.parentNode; } ; return null; }; FCKTools.Pause = function(A) { var B = new Date(); while (true) { var C = new Date(); if (A < C - B) return; } ; }; FCKTools.ConvertStyleSizeToHtml = function(A) { return A.endsWith('%') ? A : parseInt(A); }; FCKTools.ConvertHtmlSizeToStyle = function(A) { return A.endsWith('%') ? A : (A + 'px'); }; FCKTools.GetElementWindow = function(A) { var B = A.ownerDocument || A.document; if (FCKBrowserInfo.IsSafari && !B.parentWindow) FCKTools._FixDocumentParentWindow(window.top); return B.parentWindow || B.defaultView; }; FCKTools._FixDocumentParentWindow = function(A) { A.document.parentWindow = A; for (var i = 0; i < A.frames.length; i++) FCKTools._FixDocumentParentWindow(A.frames[i]); }; FCKTools.CancelEvent = function(e) { return false; }; FCKTools.AppendStyleSheet = function(A, B) { return A.createStyleSheet(B); }; FCKTools.ClearElementAttributes = function(A) { A.clearAttributes(); }; FCKTools.GetAllChildrenIds = function(A) { var B = new Array(); for (var i = 0; i < A.all.length; i++) { var C = A.all[i].id; if (C && C.length > 0) B[B.length] = C; } ; return B; }; FCKTools.RemoveOuterTags = function(e) { e.insertAdjacentHTML('beforeBegin', e.innerHTML); e.parentNode.removeChild(e); }; FCKTools.CreateXmlObject = function(A) { var B; switch (A) {case 'XmlHttp':B = ['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':B = ['MSXML2.DOMDocument','Microsoft.XmlDom'];break;} ; for (var i = 0; i < 2; i++) { try { return new ActiveXObject(B[i]); } catch (e) { } ; } ; if (FCKLang.NoActiveX) { alert(FCKLang.NoActiveX); FCKLang.NoActiveX = null; } ; }; FCKTools.DisableSelection = function(A) { A.unselectable = 'on'; var e,i = 0; while (e = A.all[i++]) { switch (e.tagName) {case 'IFRAME':case 'TEXTAREA':case 'INPUT':case 'SELECT':/* Ignore the above tags */ break;default:e.unselectable = 'on';} ; } ; } var FCKRegexLib = new Object(); FCKRegexLib.AposEntity = /'/gi; FCKRegexLib.ObjectElements = /^(?:IMG|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|HR|OBJECT|A|UL|OL|LI)$/i; FCKRegexLib.BlockElements = /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TD|TH)$/i; FCKRegexLib.EmptyElements = /^(?:BASE|META|LINK|HR|BR|PARAM|IMG|AREA|INPUT)$/i; FCKRegexLib.NamedCommands = /^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i; FCKRegexLib.BodyContents = /([\s\S]*\<body[^\>]*\>)([\s\S]*)(\<\/body\>[\s\S]*)/i; FCKRegexLib.ToReplace = /___fcktoreplace:([\w]+)/ig; FCKRegexLib.MetaHttpEquiv = /http-equiv\s*=\s*["']?([^"' ]+)/i; FCKRegexLib.HasBaseTag = /<base /i; FCKRegexLib.HeadOpener = /<head\s?[^>]*>/i; FCKRegexLib.HeadCloser = /<\/head\s*>/i; FCKRegexLib.TableBorderClass = /\s*FCK__ShowTableBorders\s*/; FCKRegexLib.ElementName = /^[A-Za-z_:][\w.\-:]*$/; FCKRegexLib.ForceSimpleAmpersand = /___FCKAmp___/g; FCKRegexLib.SpaceNoClose = /\/>/g; FCKRegexLib.EmptyParagraph = /^<(p|div)>\s*<\/\1>$/i; FCKRegexLib.TagBody = /></; FCKRegexLib.StrongOpener = /<STRONG([ \>])/gi; FCKRegexLib.StrongCloser = /<\/STRONG>/gi; FCKRegexLib.EmOpener = /<EM([ \>])/gi; FCKRegexLib.EmCloser = /<\/EM>/gi; FCKRegexLib.GeckoEntitiesMarker = /#\?-\:/g; FCKRegexLib.ProtectUrlsAApo = /(<a\s.*?href=)("|')(.+?)\2/gi; FCKRegexLib.ProtectUrlsANoApo = /(<a\s.*?href=)([^"'][^ >]+)/gi; FCKRegexLib.ProtectUrlsImgApo = /(<img\s.*?src=)("|')(.+?)\2/gi; FCKRegexLib.ProtectUrlsImgNoApo = /(<img\s.*?src=)([^"'][^ >]+)/gi; FCKLanguageManager.GetActiveLanguage = function() { if (FCKConfig.AutoDetectLanguage) { var A; if (navigator.userLanguage) A = navigator.userLanguage.toLowerCase(); else if (navigator.language) A = navigator.language.toLowerCase(); else { return FCKConfig.DefaultLanguage; } ; if (A.length >= 5) { A = A.substr(0, 5); if (this.AvailableLanguages[A]) return A; } ; if (A.length >= 2) { A = A.substr(0, 2); if (this.AvailableLanguages[A]) return A; } ; } ; return this.DefaultLanguage; }; FCKLanguageManager.TranslateElements = function(A, B, C) { var e = A.getElementsByTagName(B); for (var i = 0; i < e.length; i++) { var D = e[i].getAttribute('fckLang'); if (D) { var s = FCKLang[D]; if (s) eval('e[i].' + C + ' = s'); } ; } ; }; FCKLanguageManager.TranslatePage = function(A) { this.TranslateElements(A, 'INPUT', 'value'); this.TranslateElements(A, 'SPAN', 'innerHTML'); this.TranslateElements(A, 'LABEL', 'innerHTML'); this.TranslateElements(A, 'OPTION', 'innerHTML'); }; if (FCKLanguageManager.AvailableLanguages[FCKConfig.DefaultLanguage]) FCKLanguageManager.DefaultLanguage = FCKConfig.DefaultLanguage; else FCKLanguageManager.DefaultLanguage = 'en'; FCKLanguageManager.ActiveLanguage = new Object(); FCKLanguageManager.ActiveLanguage.Code = FCKLanguageManager.GetActiveLanguage(); FCKLanguageManager.ActiveLanguage.Name = FCKLanguageManager.AvailableLanguages[FCKLanguageManager.ActiveLanguage.Code]; FCK.Language = FCKLanguageManager; LoadLanguageFile(); var FCKEvents; if (!(FCKEvents = NS.FCKEvents)) { FCKEvents = NS.FCKEvents = function(A) { this.Owner = A; this.RegisteredEvents = new Object(); }; FCKEvents.prototype.AttachEvent = function(A, B) { if (!this.RegisteredEvents[A]) this.RegisteredEvents[A] = new Array(); this.RegisteredEvents[A][this.RegisteredEvents[A].length] = B; }; FCKEvents.prototype.FireEvent = function(A, B) { var C = true; var D = this.RegisteredEvents[A]; if (D) { for (var i = 0; i < D.length; i++) C = (D[i](this.Owner, B) && C); } ; return C; }; } var FCKXHtmlEntities = new Object(); if (FCKConfig.ProcessHTMLEntities) { FCKXHtmlEntities.Entities = {' ':'nbsp','¡':'iexcl','¢':'cent','£':'pound','¤':'curren','¥':'yen','¦':'brvbar','§':'sect','¨':'uml','©':'copy','ª':'ordf','«':'laquo','¬':'not','':'shy','®':'reg','¯':'macr','°':'deg','±':'plusmn','²':'sup2','³':'sup3','´':'acute','µ':'micro','¶':'para','·':'middot','¸':'cedil','¹':'sup1','º':'ordm','»':'raquo','¼':'frac14','½':'frac12','¾':'frac34','¿':'iquest','×':'times','÷':'divide','ƒ':'fnof','•':'bull','…':'hellip','′':'prime','″':'Prime','‾':'oline','⁄':'frasl','℘':'weierp','ℑ':'image','ℜ':'real','™':'trade','ℵ':'alefsym','←':'larr','↑':'uarr','→':'rarr','↓':'darr','↔':'harr','↵':'crarr','⇐':'lArr','⇑':'uArr','⇒':'rArr','⇓':'dArr','⇔':'hArr','∀':'forall','∂':'part','∃':'exist','∅':'empty','∇':'nabla','∈':'isin','∉':'notin','∋':'ni','∏':'prod','∑':'sum','−':'minus','∗':'lowast','√':'radic','∝':'prop','∞':'infin','∠':'ang','∧':'and','∨':'or','∩':'cap','∪':'cup','∫':'int','∴':'there4','∼':'sim','≅':'cong','≈':'asymp','≠':'ne','≡':'equiv','≤':'le','≥':'ge','⊂':'sub','⊃':'sup','⊄':'nsub','⊆':'sube','⊇':'supe','⊕':'oplus','⊗':'otimes','⊥':'perp','⋅':'sdot','◊':'loz','♠':'spades','♣':'clubs','♥':'hearts','♦':'diams','"':'quot','ˆ':'circ','˜':'tilde',' ':'ensp',' ':'emsp',' ':'thinsp','':'zwnj','':'zwj','':'lrm','':'rlm','–':'ndash','—':'mdash','‘':'lsquo','’':'rsquo','‚':'sbquo','“':'ldquo','”':'rdquo','„':'bdquo','†':'dagger','‡':'Dagger','‰':'permil','‹':'lsaquo','›':'rsaquo','€':'euro'}; FCKXHtmlEntities.Chars = ''; for (var e in FCKXHtmlEntities.Entities) FCKXHtmlEntities.Chars += e; if (FCKConfig.IncludeLatinEntities) { var oEntities = {'À':'Agrave','Á':'Aacute','Â':'Acirc','Ã':'Atilde','Ä':'Auml','Å':'Aring','Æ':'AElig','Ç':'Ccedil','È':'Egrave','É':'Eacute','Ê':'Ecirc','Ë':'Euml','Ì':'Igrave','Í':'Iacute','Î':'Icirc','Ï':'Iuml','Ð':'ETH','Ñ':'Ntilde','Ò':'Ograve','Ó':'Oacute','Ô':'Ocirc','Õ':'Otilde','Ö':'Ouml','Ø':'Oslash','Ù':'Ugrave','Ú':'Uacute','Û':'Ucirc','Ü':'Uuml','Ý':'Yacute','Þ':'THORN','ß':'szlig','à':'agrave','á':'aacute','â':'acirc','ã':'atilde','ä':'auml','å':'aring','æ':'aelig','ç':'ccedil','è':'egrave','é':'eacute','ê':'ecirc','ë':'euml','ì':'igrave','í':'iacute','î':'icirc','ï':'iuml','ð':'eth','ñ':'ntilde','ò':'ograve','ó':'oacute','ô':'ocirc','õ':'otilde','ö':'ouml','ø':'oslash','ù':'ugrave','ú':'uacute','û':'ucirc','ü':'uuml','ý':'yacute','þ':'thorn','ÿ':'yuml','Œ':'OElig','œ':'oelig','Š':'Scaron','š':'scaron','Ÿ':'Yuml'}; for (var e in oEntities) { FCKXHtmlEntities.Entities[e] = oEntities[e]; FCKXHtmlEntities.Chars += e; } ; oEntities = null; } ; if (FCKConfig.IncludeGreekEntities) { var oEntities = {'Α':'Alpha','Β':'Beta','Γ':'Gamma','Δ':'Delta','Ε':'Epsilon','Ζ':'Zeta','Η':'Eta','Θ':'Theta','Ι':'Iota','Κ':'Kappa','Λ':'Lambda','Μ':'Mu','Ν':'Nu','Ξ':'Xi','Ο':'Omicron','Π':'Pi','Ρ':'Rho','Σ':'Sigma','Τ':'Tau','Υ':'Upsilon','Φ':'Phi','Χ':'Chi','Ψ':'Psi','Ω':'Omega','α':'alpha','β':'beta','γ':'gamma','δ':'delta','ε':'epsilon','ζ':'zeta','η':'eta','θ':'theta','ι':'iota','κ':'kappa','λ':'lambda','μ':'mu','ν':'nu','ξ':'xi','ο':'omicron','π':'pi','ρ':'rho','ς':'sigmaf','σ':'sigma','τ':'tau','υ':'upsilon','φ':'phi','χ':'chi','ψ':'psi','ω':'omega'}; for (var e in oEntities) { FCKXHtmlEntities.Entities[e] = oEntities[e]; FCKXHtmlEntities.Chars += e; } ; oEntities = null; } ; FCKXHtmlEntities.EntitiesRegex = new RegExp('[' + FCKXHtmlEntities.Chars + ']|[^' + FCKXHtmlEntities.Chars + ']+', 'g'); } else { FCKXHtmlEntities.Entities = { ' ':'nbsp' }; FCKXHtmlEntities.EntitiesRegex = /[ ]|[^ ]+/g; } var FCKXHtml = new Object(); FCKXHtml.CurrentJobNum = 0; FCKXHtml.GetXHTML = function(A, B, C) { FCKXHtml.SpecialBlocks = new Array(); this.XML = FCKTools.CreateXmlObject('DOMDocument'); this.MainNode = this.XML.appendChild(this.XML.createElement('xhtml')); FCKXHtml.CurrentJobNum++; if (B) this._AppendNode(this.MainNode, A); else this._AppendChildNodes(this.MainNode, A, false); var D = this._GetMainXmlString(); D = D.substr(7, D.length - 15).trim(); if (FCKBrowserInfo.IsGecko) D = D.replace(/<br\/>$/, ''); D = D.replace(FCKRegexLib.SpaceNoClose, ' />'); if (FCKConfig.ForceSimpleAmpersand) D = D.replace(FCKRegexLib.ForceSimpleAmpersand, '&'); if (C) D = FCKCodeFormatter.Format(D); for (var i = 0; i < FCKXHtml.SpecialBlocks.length; i++) { var E = new RegExp('___FCKsi___' + i); D = D.replace(E, FCKXHtml.SpecialBlocks[i]); } ; this.XML = null; return D }; FCKXHtml._AppendAttribute = function(A, B, C) { try { var D = this.XML.createAttribute(B); D.value = C ? C : ''; A.attributes.setNamedItem(D); } catch (e) { } ; }; FCKXHtml._AppendChildNodes = function(A, B, C) { var D = 0; var E = B.firstChild; while (E) { if (this._AppendNode(A, E)) D++; E = E.nextSibling; } ; if (D == 0) { if (C && FCKConfig.FillEmptyBlocks) { this._AppendEntity(A, 'nbsp'); return; } ; if (!FCKRegexLib.EmptyElements.test(B.nodeName)) A.appendChild(this.XML.createTextNode('')); } ; }; FCKXHtml._AppendNode = function(A, B) { if (!B) return; switch (B.nodeType) {case 1:if (B.getAttribute('_fckfakelement')) return FCKXHtml._AppendNode(A, FCK.GetRealElement(B));if (FCKBrowserInfo.IsGecko && B.hasAttribute('_moz_editor_bogus_node')) return false;if (B.getAttribute('_fckdelete')) return false;var C = B.nodeName;if (FCKBrowserInfo.IsIE && B.scopeName && B.scopeName != 'HTML') C = B.scopeName + ':' + C;if (!FCKRegexLib.ElementName.test(C)) return false;C = C.toLowerCase();if (FCKBrowserInfo.IsGecko && C == 'br' && B.hasAttribute('type') && B.getAttribute('type', 2) == '_moz') return false;if (B._fckxhtmljob && B._fckxhtmljob == FCKXHtml.CurrentJobNum) return false;var D = this._CreateNode(C);FCKXHtml._AppendAttributes(A, B, D, C);B._fckxhtmljob = FCKXHtml.CurrentJobNum;var E = FCKXHtml.TagProcessors[C];if (E) { D = E(D, B); if (!D) break; } else this._AppendChildNodes(D, B, FCKRegexLib.BlockElements.test(C));A.appendChild(D);break;case 3:this._AppendTextNode(A, B.nodeValue.replaceNewLineChars(' '));break;case 8:try { A.appendChild(this.XML.createComment(B.nodeValue)); } catch (e) { /* Do nothing... probably this is a wrong format comment. */ };break;default:A.appendChild(this.XML.createComment("Element not supported - Type: " + B.nodeType + " Name: " + B.nodeName));break;} ; return true; }; if (FCKConfig.ForceStrongEm) { FCKXHtml._CreateNode = function(A) { switch (A) {case 'b':A = 'strong';break;case 'i':A = 'em';break;} ; return this.XML.createElement(A); }; } else { FCKXHtml._CreateNode = function(A) { return this.XML.createElement(A); }; } ; FCKXHtml._AppendSpecialItem = function(A) { return '___FCKsi___' + FCKXHtml.SpecialBlocks.addItem(A); }; FCKXHtml._AppendTextNode = function(A, B) { var C = B.match(FCKXHtmlEntities.EntitiesRegex); if (C) { for (var i = 0; i < C.length; i++) { if (C[i].length == 1) { var D = FCKXHtmlEntities.Entities[C[i]]; if (D != null) { this._AppendEntity(A, D); continue; } ; } ; A.appendChild(this.XML.createTextNode(C[i])); } ; } ; }; FCKXHtml.TagProcessors = new Object(); FCKXHtml.TagProcessors['img'] = function(A, B) { if (!A.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(A, 'alt', ''); var C = B.getAttribute('_fcksavedurl'); if (C && C.length > 0) FCKXHtml._AppendAttribute(A, 'src', C); return A; }; FCKXHtml.TagProcessors['a'] = function(A, B) { var C = B.getAttribute('_fcksavedurl'); if (C && C.length > 0) FCKXHtml._AppendAttribute(A, 'href', C); FCKXHtml._AppendChildNodes(A, B, false); return A; }; FCKXHtml.TagProcessors['script'] = function(A, B) { if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A, 'type', 'text/javascript'); A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.text))); return A; }; FCKXHtml.TagProcessors['style'] = function(A, B) { if (B.getAttribute('_fcktemp')) return null; if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A, 'type', 'text/css'); A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.innerHTML))); return A; }; FCKXHtml.TagProcessors['title'] = function(A, B) { A.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title)); return A; }; FCKXHtml.TagProcessors['base'] = function(A, B) { if (B.getAttribute('_fcktemp')) return null; return A; }; FCKXHtml.TagProcessors['link'] = function(A, B) { if (B.getAttribute('_fcktemp')) return null; return A; }; FCKXHtml.TagProcessors['table'] = function(A, B) { var C = A.attributes.getNamedItem('class'); if (C && FCKRegexLib.TableBorderClass.test(C.nodeValue)) { var D = C.nodeValue.replace(FCKRegexLib.TableBorderClass, ''); if (D.length == 0) A.attributes.removeNamedItem('class'); else FCKXHtml._AppendAttribute(A, 'class', D); } ; FCKXHtml._AppendChildNodes(A, B, false); return A; } FCKXHtml._GetMainXmlString = function() { return this.MainNode.xml; }; FCKXHtml._AppendEntity = function(A, B) { A.appendChild(this.XML.createEntityReference(B)); }; FCKXHtml._AppendAttributes = function(A, B, C, D) { var E = B.attributes; for (var n = 0; n < E.length; n++) { var F = E[n]; if (F.specified) { var G = F.nodeName.toLowerCase(); var H; if (G.startsWith('_fck')) continue; else if (G == 'style') H = B.style.cssText; else if (G == 'class' || G.indexOf('on') == 0) H = F.nodeValue; else if (D == 'body' && G == 'contenteditable') continue; else if (F.nodeValue === true) H = G; else if (!(H = B.getAttribute(G, 2))) H = F.nodeValue; if (FCKConfig.ForceSimpleAmpersand && H.replace) H = H.replace(/&/g, '___FCKAmp___'); this._AppendAttribute(C, G, H); } ; } ; }; FCKXHtml.TagProcessors['meta'] = function(A, B) { var C = A.attributes.getNamedItem('http-equiv'); if (C == null || C.value.length == 0) { var D = B.outerHTML.match(FCKRegexLib.MetaHttpEquiv); if (D) { D = D[1]; FCKXHtml._AppendAttribute(A, 'http-equiv', D); } ; } ; return A; }; FCKXHtml.TagProcessors['font'] = function(A, B) { if (A.attributes.length == 0) A = FCKXHtml.XML.createDocumentFragment(); FCKXHtml._AppendChildNodes(A, B); return A; }; FCKXHtml.TagProcessors['input'] = function(A, B) { if (B.name) FCKXHtml._AppendAttribute(A, 'name', B.name); if (B.value && !A.attributes.getNamedItem('value')) FCKXHtml._AppendAttribute(A, 'value', B.value); return A; }; FCKXHtml.TagProcessors['option'] = function(A, B) { if (B.selected && !A.attributes.getNamedItem('selected')) FCKXHtml._AppendAttribute(A, 'selected', 'selected'); FCKXHtml._AppendChildNodes(A, B); return A; }; FCKXHtml.TagProcessors['abbr'] = function(A, B) { var C = B.nextSibling; while (true) { if (C && C.nodeName != '/ABBR') { FCKXHtml._AppendNode(A, C); C = C.nextSibling; } else break; } ; return A; }; FCKXHtml.TagProcessors['area'] = function(A, B) { if (!A.attributes.getNamedItem('coords')) { var C = B.getAttribute('coords', 2); if (C && C != '0,0,0') FCKXHtml._AppendAttribute(A, 'coords', C); } ; if (!A.attributes.getNamedItem('shape')) { var C = B.getAttribute('shape', 2); if (C && C.length > 0) FCKXHtml._AppendAttribute(A, 'shape', C); } ; return A; }; FCKXHtml.TagProcessors['label'] = function(A, B) { if (B.htmlFor.length > 0) FCKXHtml._AppendAttribute(A, 'for', B.htmlFor); FCKXHtml._AppendChildNodes(A, B); return A; }; FCKXHtml.TagProcessors['form'] = function(A, B) { if (B.acceptCharset && B.acceptCharset.length > 0 && B.acceptCharset != 'UNKNOWN') FCKXHtml._AppendAttribute(A, 'accept-charset', B.acceptCharset); if (B.name) FCKXHtml._AppendAttribute(A, 'name', B.name); FCKXHtml._AppendChildNodes(A, B); return A; }; FCKXHtml.TagProcessors['textarea'] = FCKXHtml.TagProcessors['select'] = function(A, B) { if (B.name) FCKXHtml._AppendAttribute(A, 'name', B.name); FCKXHtml._AppendChildNodes(A, B); return A; }; FCKXHtml.TagProcessors['div'] = function(A, B) { if (B.align.length > 0) FCKXHtml._AppendAttribute(A, 'align', B.align); FCKXHtml._AppendChildNodes(A, B); return A; } var FCKCodeFormatter; if (!(FCKCodeFormatter = NS.FCKCodeFormatter)) { FCKCodeFormatter = NS.FCKCodeFormatter = new Object(); FCKCodeFormatter.Regex = new Object(); FCKCodeFormatter.Regex.BlocksOpener = /\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi; FCKCodeFormatter.Regex.BlocksCloser = /\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi; FCKCodeFormatter.Regex.NewLineTags = /\<(BR|HR)[^\>]\>/gi; FCKCodeFormatter.Regex.MainTags = /\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi; FCKCodeFormatter.Regex.LineSplitter = /\s*\n+\s*/g; FCKCodeFormatter.Regex.IncreaseIndent = /^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \/\>]/i; FCKCodeFormatter.Regex.DecreaseIndent = /^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL)[ \>]/i; FCKCodeFormatter.Regex.FormatIndentatorRemove = new RegExp(FCKConfig.FormatIndentator); FCKCodeFormatter.Regex.ProtectedTags = /(<PRE[^>]*>)([\s\S]*?)(<\/PRE>)/gi; FCKCodeFormatter._ProtectData = function(A, B, C, D) { return B + '___FCKpd___' + FCKCodeFormatter.ProtectedData.addItem(C) + D; }; FCKCodeFormatter.Format = function(A) { FCKCodeFormatter.ProtectedData = new Array(); var B = A.replace(this.Regex.ProtectedTags, FCKCodeFormatter._ProtectData); B = B.replace(this.Regex.BlocksOpener, '\n$&'); ; B = B.replace(this.Regex.BlocksCloser, '$&\n'); B = B.replace(this.Regex.NewLineTags, '$&\n'); B = B.replace(this.Regex.MainTags, '\n$&\n'); var C = ''; var D = B.split(this.Regex.LineSplitter); B = ''; for (var i = 0; i < D.length; i++) { var E = D[i]; if (E.length == 0) continue; if (this.Regex.DecreaseIndent.test(E)) C = C.replace(this.Regex.FormatIndentatorRemove, ''); B += C + E + '\n'; if (this.Regex.IncreaseIndent.test(E)) C += FCKConfig.FormatIndentator; } ; for (var i = 0; i < FCKCodeFormatter.ProtectedData.length; i++) { var F = new RegExp('___FCKpd___' + i); B = B.replace(F, FCKCodeFormatter.ProtectedData[i]); } ; return B.trim(); }; } var FCKUndo = new Object(); FCKUndo.SavedData = new Array(); FCKUndo.CurrentIndex = -1; FCKUndo.TypesCount = FCKUndo.MaxTypes = 25; FCKUndo.Typing = false; FCKUndo.SaveUndoStep = function() { FCKUndo.SavedData = FCKUndo.SavedData.slice(0, FCKUndo.CurrentIndex + 1); var A = FCK.EditorDocument.body.innerHTML; if (FCKUndo.CurrentIndex >= 0 && A == FCKUndo.SavedData[FCKUndo.CurrentIndex][0]) return; if (FCKUndo.CurrentIndex + 1 >= FCKConfig.MaxUndoLevels) FCKUndo.SavedData.shift(); else FCKUndo.CurrentIndex++; var B; if (FCK.EditorDocument.selection.type == 'Text') B = FCK.EditorDocument.selection.createRange().getBookmark(); FCKUndo.SavedData[FCKUndo.CurrentIndex] = [A,B]; FCK.Events.FireEvent("OnSelectionChange"); }; FCKUndo.CheckUndoState = function() { return (FCKUndo.Typing || FCKUndo.CurrentIndex > 0); }; FCKUndo.CheckRedoState = function() { return (!FCKUndo.Typing && FCKUndo.CurrentIndex < (FCKUndo.SavedData.length - 1)); }; FCKUndo.Undo = function() { if (FCKUndo.CheckUndoState()) { if (FCKUndo.CurrentIndex == (FCKUndo.SavedData.length - 1)) { FCKUndo.SaveUndoStep(); } ; FCKUndo._ApplyUndoLevel(--FCKUndo.CurrentIndex); FCK.Events.FireEvent("OnSelectionChange"); } ; }; FCKUndo.Redo = function() { if (FCKUndo.CheckRedoState()) { FCKUndo._ApplyUndoLevel(++FCKUndo.CurrentIndex); FCK.Events.FireEvent("OnSelectionChange"); } ; }; FCKUndo._ApplyUndoLevel = function(A) { var B = FCKUndo.SavedData[A]; if (!B) return; FCK.SetInnerHtml(B[0]); if (B[1]) { var C = FCK.EditorDocument.selection.createRange(); C.moveToBookmark(B[1]); C.select(); } ; FCKUndo.TypesCount = 0; FCKUndo.Typing = false; } var FCK_StartupValue; FCK.Events = new FCKEvents(FCK); FCK.Toolbar = null; FCK.TempBaseTag = FCKConfig.BaseHref.length > 0 ? '<base href="' + FCKConfig.BaseHref + '" _fcktemp="true"></base>' : ''; FCK.StartEditor = function() { this.EditorWindow = window.frames['eEditorArea']; this.EditorDocument = this.EditorWindow.document; this.SetHTML(FCKTools.GetLinkedFieldValue()); this.ResetIsDirty(); FCKTools.AttachToLinkedFieldFormSubmit(this.UpdateLinkedField); FCKUndo.SaveUndoStep(); this.SetStatus(FCK_STATUS_ACTIVE); }; function Window_OnFocus() { FCK.Focus(); FCK.Events.FireEvent("OnFocus"); } ; function Window_OnBlur() { if (!FCKDialog.IsOpened) return FCK.Events.FireEvent("OnBlur"); } ; FCK.SetStatus = function(A) { this.Status = A; if (A == FCK_STATUS_ACTIVE) { window.frameElement.onfocus = window.document.body.onfocus = Window_OnFocus; window.frameElement.onblur = Window_OnBlur; if (FCKConfig.StartupFocus) FCK.Focus(); if (FCKBrowserInfo.IsIE) FCKScriptLoader.AddScript('js/fckeditorcode_ie_2.js'); else FCKScriptLoader.AddScript('js/fckeditorcode_gecko_2.js'); } ; this.Events.FireEvent('OnStatusChange', A); }; FCK.GetHTML = function(A) { FCK.GetXHTML(A); }; FCK.GetXHTML = function(A) { var B = (FCK.EditMode == FCK_EDITMODE_SOURCE); if (B) this.SwitchEditMode(); var C; if (FCKConfig.FullPage) C = FCKXHtml.GetXHTML(this.EditorDocument.getElementsByTagName('html')[0], true, A); else { if (FCKConfig.IgnoreEmptyParagraphValue && this.EditorDocument.body.innerHTML == '<P> </P>') C = ''; else C = FCKXHtml.GetXHTML(this.EditorDocument.body, false, A); } ; if (B) this.SwitchEditMode(); if (FCKBrowserInfo.IsIE) C = C.replace(FCKRegexLib.ToReplace, '$1'); if (FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0) C = FCK.DocTypeDeclaration + '\n' + C; if (FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0) C = FCK.XmlDeclaration + '\n' + C; return FCKConfig.ProtectedSource.Revert(C); }; FCK.UpdateLinkedField = function() { FCK.LinkedField.value = FCK.GetXHTML(FCKConfig.FormatOutput); FCK.Events.FireEvent('OnAfterLinkedFieldUpdate'); }; FCK.ShowContextMenu = function(x, y) { if (this.Status != FCK_STATUS_COMPLETE) return; FCKContextMenu.Show(x, y); this.Events.FireEvent("OnContextMenu"); }; FCK.RegisteredDoubleClickHandlers = new Object(); FCK.OnDoubleClick = function(A) { var B = FCK.RegisteredDoubleClickHandlers[A.tagName]; if (B) B(A); }; FCK.RegisterDoubleClickHandler = function(A, B) { FCK.RegisteredDoubleClickHandlers[B.toUpperCase()] = A; }; FCK.OnAfterSetHTML = function() { var A,i = 0; while ((A = FCKDocumentProcessors[i++])) A.ProcessDocument(FCK.EditorDocument); this.Events.FireEvent('OnAfterSetHTML'); }; FCK.ProtectUrls = function(A) { A = A.replace(FCKRegexLib.ProtectUrlsAApo, '$1$2$3$2 _fcksavedurl=$2$3$2'); A = A.replace(FCKRegexLib.ProtectUrlsANoApo, '$1$2 _fcksavedurl="$2"'); A = A.replace(FCKRegexLib.ProtectUrlsImgApo, '$1$2$3$2 _fcksavedurl=$2$3$2'); A = A.replace(FCKRegexLib.ProtectUrlsImgNoApo, '$1$2 _fcksavedurl="$2"'); return A; }; FCK.IsDirty = function() { return (FCK_StartupValue != FCK.EditorDocument.body.innerHTML); }; FCK.ResetIsDirty = function() { if (FCK.EditorDocument.body) FCK_StartupValue = FCK.EditorDocument.body.innerHTML; }; var FCKDocumentProcessors = new Array(); var FCKDocumentProcessors_CreateFakeImage = function(A, B) { var C = FCK.EditorDocument.createElement('IMG'); C.className = A; C.src = FCKConfig.FullBasePath + 'images/spacer.gif'; C.setAttribute('_fckfakelement', 'true', 0); C.setAttribute('_fckrealelement', FCKTempBin.AddElement(B), 0); return C; }; var FCKAnchorsProcessor = new Object(); FCKAnchorsProcessor.ProcessDocument = function(A) { var B = A.getElementsByTagName('A'); var C; var i = B.length - 1; while (i >= 0 && (C = B[i--])) { if (C.name.length > 0 && (!C.getAttribute('href') || C.getAttribute('href').length == 0)) { var D = FCKDocumentProcessors_CreateFakeImage('FCK__Anchor', C.cloneNode(true)); D.setAttribute('_fckanchor', 'true', 0); C.parentNode.insertBefore(D, C); C.parentNode.removeChild(C); } ; } ; }; FCKDocumentProcessors.addItem(FCKAnchorsProcessor); var FCKPageBreaksProcessor = new Object(); FCKPageBreaksProcessor.ProcessDocument = function(A) { var B = A.getElementsByTagName('DIV'); var C; var i = B.length - 1; while (i >= 0 && (C = B[i--])) { if (C.style.pageBreakAfter == 'always' && C.childNodes.length == 1 && C.childNodes[0].style && C.childNodes[0].style.display == 'none') { var D = FCKDocumentProcessors_CreateFakeImage('FCK__PageBreak', C.cloneNode(true)); C.parentNode.insertBefore(D, C); C.parentNode.removeChild(C); } ; } ; }; FCKDocumentProcessors.addItem(FCKPageBreaksProcessor); var FCKFlashProcessor = new Object(); FCKFlashProcessor.ProcessDocument = function(A) { var B = A.getElementsByTagName('EMBED'); var C; var i = B.length - 1; while (i >= 0 && (C = B[i--])) { if (C.src.endsWith('.swf', true)) { var D = C.cloneNode(true); if (FCKBrowserInfo.IsIE) { D.setAttribute('scale', C.getAttribute('scale')); D.setAttribute('play', C.getAttribute('play')); D.setAttribute('loop', C.getAttribute('loop')); D.setAttribute('menu', C.getAttribute('menu')); } ; var E = FCKDocumentProcessors_CreateFakeImage('FCK__Flash', D); E.setAttribute('_fckflash', 'true', 0); FCKFlashProcessor.RefreshView(E, C); C.parentNode.insertBefore(E, C); C.parentNode.removeChild(C); } ; } ; }; FCKFlashProcessor.RefreshView = function(A, B) { if (B.width > 0) A.style.width = FCKTools.ConvertHtmlSizeToStyle(B.width); if (B.height > 0) A.style.height = FCKTools.ConvertHtmlSizeToStyle(B.height); }; FCKDocumentProcessors.addItem(FCKFlashProcessor); FCK.GetRealElement = function(A) { var e = FCKTempBin.Elements[A.getAttribute('_fckrealelement')]; if (A.getAttribute('_fckflash')) { if (A.style.width.length > 0) e.width = FCKTools.ConvertStyleSizeToHtml(A.style.width); if (A.style.height.length > 0) e.height = FCKTools.ConvertStyleSizeToHtml(A.style.height); } ; return e; }; FCK.Description = "FCKeditor for Internet Explorer 5.5+"; FCK._BehaviorsStyle = '<style type="text/css" _fcktemp="true">\ INPUT { behavior:url(' + FCKConfig.FullBasePath + 'css/behaviors/hiddenfield.htc);} '; if (FCKConfig.ShowBorders) FCK._BehaviorsStyle += 'TABLE { behavior: url(' + FCKConfig.FullBasePath + 'css/behaviors/showtableborders.htc) ; }'; var sNoHandlers = 'INPUT, TEXTAREA, SELECT, .FCK__Anchor, .FCK__PageBreak'; if (FCKConfig.DisableImageHandles) sNoHandlers += ', IMG'; if (FCKConfig.DisableTableHandles) sNoHandlers += ', TABLE'; FCK._BehaviorsStyle += sNoHandlers + ' { behavior: url(' + FCKConfig.FullBasePath + 'css/behaviors/disablehandles.htc) ; }'; FCK._BehaviorsStyle += '</style>'; function Doc_OnMouseUp() { if (FCK.EditorWindow.event.srcElement.tagName == 'HTML') { FCK.Focus(); FCK.EditorWindow.event.cancelBubble = true; FCK.EditorWindow.event.returnValue = false; } ; } ; function Doc_OnPaste() { if (FCK.Status == FCK_STATUS_COMPLETE) return FCK.Events.FireEvent("OnPaste"); else return false; } ; function Doc_OnContextMenu() { var e = FCK.EditorWindow.event; FCK.ShowContextMenu(e.screenX, e.screenY); return false; } ; function Doc_OnKeyDown() { var e = FCK.EditorWindow.event; switch (e.keyCode) {case 13:if (FCKConfig.UseBROnCarriageReturn && !(e.ctrlKey || e.altKey || e.shiftKey)) { Doc_OnKeyDownUndo(); if (FCK.EditorDocument.queryCommandState('InsertOrderedList') || FCK.EditorDocument.queryCommandState('InsertUnorderedList')) return true; FCK.InsertHtml('<br> '); var oRange = FCK.EditorDocument.selection.createRange(); oRange.moveStart('character', -1); oRange.select(); FCK.EditorDocument.selection.clear(); return false; };break;case 8:if (FCKSelection.GetType() == 'Control') { FCKSelection.Delete(); return false; };break;case 9:if (FCKConfig.TabSpaces > 0 && !(e.ctrlKey || e.altKey || e.shiftKey)) { Doc_OnKeyDownUndo(); FCK.InsertHtml(window.FCKTabHTML); return false; };break;case 90:if (e.ctrlKey && !(e.altKey || e.shiftKey)) { FCKUndo.Undo(); return false; };break;case 89:if (e.ctrlKey && !(e.altKey || e.shiftKey)) { FCKUndo.Redo(); return false; };break;} ; if (!(e.keyCode >= 16 && e.keyCode <= 18)) Doc_OnKeyDownUndo(); return true; } ; function Doc_OnKeyDownUndo() { if (!FCKUndo.Typing) { FCKUndo.SaveUndoStep(); FCKUndo.Typing = true; FCK.Events.FireEvent("OnSelectionChange"); } ; FCKUndo.TypesCount++; if (FCKUndo.TypesCount > FCKUndo.MaxTypes) { FCKUndo.TypesCount = 0; FCKUndo.SaveUndoStep(); } ; } ; function Doc_OnDblClick() { FCK.OnDoubleClick(FCK.EditorWindow.event.srcElement); FCK.EditorWindow.event.cancelBubble = true; } ; function Doc_OnSelectionChange() { FCK.Events.FireEvent("OnSelectionChange"); } ; FCK.InitializeBehaviors = function(A) { this.EditorDocument.attachEvent('onmouseup', Doc_OnMouseUp); this.EditorDocument.body.attachEvent('onpaste', Doc_OnPaste); this.EditorDocument.attachEvent('oncontextmenu', Doc_OnContextMenu); if (FCKConfig.TabSpaces > 0) { window.FCKTabHTML = ''; for (i = 0; i < FCKConfig.TabSpaces; i++) window.FCKTabHTML += " "; } ; this.EditorDocument.attachEvent("onkeydown", Doc_OnKeyDown); this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick); this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange); }; FCK.Focus = function() { try { if (FCK.EditMode == FCK_EDITMODE_WYSIWYG) FCK.EditorDocument.body.focus(); else document.getElementById('eSourceField').focus(); } catch(e) { } ; }; FCK.SetHTML = function(A, B) { if (B || FCK.EditMode == FCK_EDITMODE_WYSIWYG) { A = FCKConfig.ProtectedSource.Protect(A); A = FCK.ProtectUrls(A); var C; if (FCKConfig.FullPage) { var C = FCK._BehaviorsStyle + '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />'; if (FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test(A)) C += FCK.TempBaseTag; C = A.replace(FCKRegexLib.HeadOpener, '$&' + C); } else { C = FCKConfig.DocType + '<html dir="' + FCKConfig.ContentLangDirection + '"'; if (FCKConfig.IEForceVScroll) C += ' style="overflow-y: scroll"'; C += '><head><title></title>' + '<link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" />' + '<link href="' + FCKConfig.FullBasePath + 'css/fck_internal.css' + '" rel="stylesheet" type="text/css" _fcktemp="true" />'; C += FCK._BehaviorsStyle; C += FCK.TempBaseTag; C += '</head><body>' + A + '</body></html>'; } ; this.EditorDocument.open('', 'replace'); this.EditorDocument.write(C); this.EditorDocument.close(); this.InitializeBehaviors(); this.EditorDocument.body.contentEditable = true; FCK.OnAfterSetHTML(); } else document.getElementById('eSourceField').value = A; }; FCK.InsertHtml = function(A) { A = FCKConfig.ProtectedSource.Protect(A); A = FCK.ProtectUrls(A); FCK.Focus(); FCKUndo.SaveUndoStep(); var B = FCK.EditorDocument.selection; if (B.type.toLowerCase() != "none") B.clear(); B.createRange().pasteHTML(A); }; FCK.SetInnerHtml = function(A) { var B = FCK.EditorDocument; B.body.innerHTML = '<div id="__fakeFCKRemove__"> </div>' + A; B.getElementById('__fakeFCKRemove__').removeNode(true); }
发表评论
-
37signals也能down成这样 ?
2008-01-19 01:10 2447今天想37signals上去看看我的todolist来着,没想 ... -
一个CDN问题 - 处理动态请求
2007-10-30 01:48 2975当网站的负载达到一定负荷,需要扩容的时候,CDN正在成为网站的 ... -
推荐37signal旗下的一个网站 - tadalist
2007-05-01 21:42 3354最近看Matt raible的blog时,看到他推荐的一个网站 ... -
豆瓣的9点有点意思
2007-03-23 23:50 3144豆瓣的9点 http://9.douban.com/help ... -
一道java面试题
2007-03-10 21:38 6093这是面试的季节。 前几天去面试,碰到一个java题目,要求1 ... -
javaeye也可以面向入门者吗?
2007-02-11 02:42 1736ouspec 写道bigpanda 写道这一点还是慎重好,别精 ... -
发在入门讨论的帖子,或者被评为新手贴的是不是没有发贴和回帖积分?
2006-12-16 12:50 2707直接发在入门讨论版的帖子,是不是没有积分 ? 转移到入门讨论版 ... -
杀毒软件的选择
2006-11-04 00:30 10116最近感觉用了2年多的norton 8 client有些顶不住了 ... -
今天发现javaeye明显没有前几天快了呢
2006-10-22 00:58 2579是不是robbin再多开几个fastcgi进程呀! 这个技术 ...
相关推荐
注意:需要转换的js文件里面不能有注释,有的话,它转换不了。 在网上下载一些js文件,但是打开后,就像一段话一样,好长,好长,没有任何格式,想看一下就不成。
因此,一个优质的js格式化工具不仅可以帮助开发者提升效率,还能保证代码的安全性与一致性。 JS格式化工具之所以重要,首先源于JavaScript语言的广泛运用。作为前端开发的核心技术之一,JavaScript在动态内容处理和...
如果代码压缩前有特定的编码规范,可以调整格式化工具的配置来匹配原有的风格。 总的来说,JS格式化排版工具是开发者不可或缺的辅助工具,它们使得压缩后的JS代码变得易于理解和修改,提高了代码的可维护性。通过...
"JS格式化工具"就是为了帮助开发者整理混乱的JS代码,使其符合特定的编码风格而设计的。 "JS格式化工具"通常具备以下功能: 1. **自动缩进**:工具可以自动调整代码的缩进,确保每个级别的嵌套都有正确的空格或...
js通用日期格式化工具,直接引用该工具类就可以使用,方便快捷,建议大家收藏此工具类,该工具很好的解决了前端页面显示日期格式问题
6. **代码压缩**:对于生产环境,为了减少文件大小和加载时间,格式化工具可以将代码压缩为一行,移除不必要的空白和注释。 7. **代码风格转换**:允许用户在不同编码风格之间切换,例如ESLint、Airbnb等风格指南。...
javascript格式化工具javascript格式化工具javascript格式化工具javascript格式化工具javascript格式化工具javascript格式化工具javascript格式化工具
代码格式化工具是一种重要的开发辅助软件,主要用于整理和优化代码的布局与缩进,使得代码更易读、更规范。这种工具广泛应用于多种编程语言,包括但不限于Java、Python、JavaScript、C++等。通过自动调整代码的空格...
对于团队协作项目,可以将这些格式化工具集成到版本控制系统(如Git)的钩子中,或者持续集成(CI/CD)流程,确保提交的代码始终保持一致的格式。 7. **效率提升** 使用JS/HTML格式化工具不仅可以节省手动格式化...
这就是JavaScript格式化工具的作用所在,它们能够帮助开发者整理JS代码,使其保持整洁、易读的格式,提高代码质量和团队合作效率。 1. **JavaScript格式化的重要性** - **可读性**:格式化的JavaScript代码更易于...
例如,压缩包中的"js格式化工具.html"很可能是一个在线版的JS格式化工具,用户只需要在浏览器中打开这个HTML文件,就可以直接在页面上使用。这种工具通常轻便快捷,无需安装,适用于各种操作系统和环境。 总的来说...
总之,JS代码格式化工具是现代前端开发不可或缺的一部分,它们可以帮助我们保持代码的整洁和一致性,提高团队合作的效率。无论是在线工具还是编辑器插件,都能在日常工作中带来很大的便利。选择合适的工具并合理配置...
JavaScript文件格式化工具是开发人员在处理代码时不可或缺的一个实用工具。它主要用于将压缩或混乱的JavaScript代码恢复成可读性更强、遵循特定编码规范的形式。这类工具的主要目的是提高代码的可维护性和团队协作...
js格式化json工具。把json字符串格式化成更好辨认的格式。
这款"JSON格式化工具"是一款绿色免安装版本,无需复杂的安装过程,只需解压缩文件包,找到并运行"JsonView.exe"这个执行文件,就可以立即开始使用。这种便捷性使得开发者无论在任何环境下都能快速地对JSON数据进行...
为了解决这个问题,开发者可以借助各种JS代码格式化工具,确保团队间的代码风格统一,便于协同工作。 常见的JavaScript代码格式化工具有很多,例如: 1. **Prettier**:Prettier 是一个非常流行的代码格式化工具,...
"Json和Xml离线格式化工具"是针对这两种格式的解析和美化工具,可以在没有网络连接的情况下对JSON和XML数据进行格式化,使得数据更易于阅读和理解。 JSON格式化工具通常包含以下功能: 1. **代码高亮**:为键值对和...
对于Java开发者,`google-java-format`是一款广泛使用的代码格式化工具,它遵循Google的Java编码风格指南。用户可以通过在项目的`build.gradle`文件中添加插件来使用它,或者在命令行运行`google-java-format`命令对...