diff --git a/lib/client/edit.js b/lib/client/edit.js index ab486b62..ec7f7dc1 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -112,8 +112,6 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; function initAce() { var lSession; - ace.require('ace/ext/language_tools'); - Ace = ace.edit(Element); lSession = Ace.getSession(); @@ -202,12 +200,15 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; var lFiles = [ DIR + 'theme-tomorrow_night_blue.js', DIR + 'ext-language_tools.js', - DIR + 'ace.js', + DIR + 'ext-searchbox.js', + DIR + 'snippets/javascript.js', + DIR + 'mode-javascript.js', ], + lAce = DIR + 'ace.js', lURL = DOM.combineURL(lFiles); - DOM.jsload(lURL, function() { + DOM.anyLoadOnLoad([lURL, lAce], function() { Util.timeEnd(Name + ' load'); Loading = false; Util.exec(pCallBack);