From a8487dd5dc4f7de91c829d6a6db496fb47ef9d43 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 20 May 2016 14:42:05 +0100 Subject: [PATCH] client Var value for disabling scripts --- src/static/js/ace.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/static/js/ace.js b/src/static/js/ace.js index a5e365ce..ac288e6f 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -226,8 +226,13 @@ function Ace2Editor() var includedCSS = []; var $$INCLUDE_CSS = function(filename) {includedCSS.push(filename)}; $$INCLUDE_CSS("../static/css/iframe_editor.css"); - $$INCLUDE_CSS("../static/css/pad.css"); - $$INCLUDE_CSS("../static/custom/pad.css"); + + // disableCustomScriptsAndStyles can be used to disable loading of custom scripts + if(!clientVars.disableCustomScriptsAndStyles){ + console.log("loading custom shit"); // cake remove me + $$INCLUDE_CSS("../static/css/pad.css"); + $$INCLUDE_CSS("../static/custom/pad.css"); + } var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){ if (path.match(/\/\//)) { // Allow urls to external CSS - http(s):// and //some/path.css