From 6cbf8a62458fd7ce6561568dc096b6eb04c1290f Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Sun, 12 Apr 2015 13:55:08 +0200 Subject: [PATCH] Embed less --- src/static/js/ace.js | 73 ++++++++------------------------------------ 1 file changed, 12 insertions(+), 61 deletions(-) diff --git a/src/static/js/ace.js b/src/static/js/ace.js index fe33c7406..4b110f6d0 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -24,8 +24,6 @@ // requires: plugins // requires: undefined -var KERNEL_SOURCE = '../static/js/require-kernel.js'; - Ace2Editor.registry = { nextId: 1 }; @@ -150,42 +148,9 @@ function Ace2Editor() return info.ace_getUnhandledErrors(); }; - - - function sortFilesByEmbeded(files) { - var embededFiles = []; - var remoteFiles = []; - - if (Ace2Editor.EMBEDED) { - for (var i = 0, ii = files.length; i < ii; i++) { - var file = files[i]; - if (Object.prototype.hasOwnProperty.call(Ace2Editor.EMBEDED, file)) { - embededFiles.push(file); - } else { - remoteFiles.push(file); - } - } - } else { - remoteFiles = files; - } - - return {embeded: embededFiles, remote: remoteFiles}; - } function pushStyleTagsFor(buffer, files) { - var sorted = sortFilesByEmbeded(files); - var embededFiles = sorted.embeded; - var remoteFiles = sorted.remote; - - if (embededFiles.length > 0) { - buffer.push('