From 23a166ca99d442284001844ca0b4fff7280de4a8 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Mon, 30 Jan 2012 13:27:43 -0800 Subject: [PATCH] JSON exports itself. This fixes issue #376. --- static/js/json2.js | 2 ++ static/js/pad.js | 2 +- static/js/timeslider.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) 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/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)