summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2016-05-20 14:42:05 +0100
committerJohn McLear <john@mclear.co.uk>2016-05-20 14:42:05 +0100
commita8487dd5dc4f7de91c829d6a6db496fb47ef9d43 (patch)
tree03686395803defd85b2ecb9d7ec9a4d2be3d68c1
parent94920e5552b875f110bac8dbd72e15573da2a0b5 (diff)
downloadetherpad-lite-a8487dd5dc4f7de91c829d6a6db496fb47ef9d43.zip
client Var value for disabling scripts
-rw-r--r--src/static/js/ace.js9
1 files 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