From f7b8813a27141a78980eefa03df70a4a2de9d10b Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 28 May 2014 17:07:41 +0100 Subject: [PATCH] Change permalink behaviour Now a link to a single tiddler like http://tiddlywiki.com/#HelloThere will just open that single tiddler (the old behaviour was to also open the default tiddlers) --- core/modules/startup/story.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/startup/story.js b/core/modules/startup/story.js index 893dc96ec..99d14e963 100644 --- a/core/modules/startup/story.js +++ b/core/modules/startup/story.js @@ -63,7 +63,7 @@ function openStartupTiddlers(options) { options = options || {}; // Decode the hash portion of our URL var target, - storyFilter; + storyFilter = null; if($tw.locationHash.length > 1) { var hash = $tw.locationHash.substr(1), split = hash.indexOf(":"); @@ -74,13 +74,13 @@ function openStartupTiddlers(options) { storyFilter = decodeURIComponent(hash.substr(split + 1).trim()); } } - // Use the story filter specified in the hash, or the default tiddlers - if(!storyFilter || storyFilter === "") { + // If the story wasn't specified use the current tiddlers or a blank story + if(storyFilter === null) { if(options.defaultToCurrentStory) { var currStoryList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE); storyFilter = $tw.utils.stringifyList(currStoryList); } else { - storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE); + storyFilter = ""; } } var storyList = $tw.wiki.filterTiddlers(storyFilter);