diff --git a/static/js/json2.js b/static/js/json2.js index 898e8369..663f932c 100644 --- a/static/js/json2.js +++ b/static/js/json2.js @@ -469,3 +469,5 @@ if (!JSON) }; } }()); + +module.exports = JSON; diff --git a/static/js/pad.js b/static/js/pad.js index fb297d4a..0ed2a5d0 100644 --- a/static/js/pad.js +++ b/static/js/pad.js @@ -30,7 +30,7 @@ require('/jquery'); require('/jquery-ui'); require('/farbtastic'); require('/excanvas'); -require('/json2'); +JSON = require('/json2'); require('/undo-xpopup'); var chat = require('/chat').chat; diff --git a/static/js/pad_editor.js b/static/js/pad_editor.js index 6d3cbf40..d336aa87 100644 --- a/static/js/pad_editor.js +++ b/static/js/pad_editor.js @@ -141,6 +141,7 @@ var padeditor = (function() if (self.ace) { self.ace.destroy(); + self.ace = null; } }, disable: function() diff --git a/static/js/timeslider.js b/static/js/timeslider.js index 939c4c64..b02fd22f 100644 --- a/static/js/timeslider.js +++ b/static/js/timeslider.js @@ -23,7 +23,7 @@ // These jQuery things should create local references, but for now `require()` // assigns to the global `$` and augments it with plugins. require('/jquery'); -require('/json2'); +JSON = require('/json2'); require('/undo-xpopup'); function createCookie(name,value,days)