From a274bad1a29b83e77bb695affd39235f681f050c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 1 Mar 2012 23:24:25 +0000 Subject: [PATCH] Tying up the ability to load javascript modules as tiddlers --- js/App.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/js/App.js b/js/App.js index 5aeeee32c..c16c449b9 100644 --- a/js/App.js +++ b/js/App.js @@ -36,6 +36,7 @@ var App = function() { this.store.registerParser("image/gif",imageParser); // Set up the JavaScript parser this.store.jsParser = new JavaScriptParser(); + this.store.registerParser("application/javascript",this.store.jsParser); // Register the standard tiddler serializers and deserializers tiddlerInput.register(this.store); tiddlerOutput.register(this.store); @@ -75,8 +76,15 @@ var App = function() { } // If in the browser, load the tiddlers built into the TiddlyWiki document if(this.isBrowser) { - var storeArea = document.getElementById("storeArea"), - tiddlers = this.store.deserializeTiddlers("(DOM)",storeArea); + // First, the JavaScript system tiddlers + var moduleArea = document.getElementById("jsModules"), + tiddlers = this.store.deserializeTiddlers("(DOM)",moduleArea); + for(t=0; t