1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-15 14:57:42 +00:00

Refactor navigator widget to use story utility to manipulate the storylist as well as the historylist

This commit is contained in:
Jermolene
2018-08-23 18:31:48 +01:00
parent 3bfa9c6f10
commit 0f7ce7b67f
2 changed files with 13 additions and 45 deletions

View File

@@ -1277,6 +1277,18 @@ exports.addToHistory = function(title,fromPageRect,historyTitle) {
story.addToHistory(title,fromPageRect);
};
/*
Add a new tiddler to the story river
title: a title string or an array of title strings
fromTitle: the title of the tiddler from which the navigation originated
storyTitle: title of story tiddler (defaults to $:/StoryList)
options: see story.js
*/
exports.addToStory = function(title,fromTitle,storyTitle,options) {
var story = new $tw.Story({wiki: this, storyTitle: storyTitle});
story.addToStory(title,fromTitle,options);
};
/*
Invoke the available upgrader modules
titles: array of tiddler titles to be processed