diff --git a/core/modules/startup.js b/core/modules/startup.js index fac0ad0ef..ade8c9f97 100644 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -61,6 +61,26 @@ exports.startup = function() { wiki: $tw.wiki, rootElement: document.body }); + // Install the scroller + $tw.scroller = new $tw.utils.Scroller(); + // Get the default tiddlers + var defaultTiddlersTitle = "$:/DefaultTiddlers", + defaultTiddlersTiddler = $tw.wiki.getTiddler(defaultTiddlersTitle), + defaultTiddlers = []; + if(defaultTiddlersTiddler) { + defaultTiddlers = $tw.wiki.filterTiddlers(defaultTiddlersTiddler.fields.text); + } + // Initialise the story and history + var storyTitle = "$:/StoryTiddlers", + historyTitle = "$:/History", + story = {tiddlers: []}, + history = {stack: []}; + for(var t=0; t