There are actually 2 addToStory() functions. One in navigator.js and one in story.js. ... IMO that's a bug, because the are slightly different, which shouldn't be!
The story function looks like this: Story.prototype.addToStory = function(navigateTo,navigateFromTitle,options)
var story = new $tw.Story();
story.addToStory("HelloThere");
You'll need to have a look, at the source code to see, what's going on.
hope that helps
have fun!
mario
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/24d8cd8e-559e-45fc-bb3a-440d4c8f1f01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The support for multiple story rivers with their own navigation means that the story logic primary lives in the navigator widget. However, it's not very easy for external code to get hold of the story information maintained by the navigator widget. That’s why the global story object was added.
That looks right. You probably want to call story.navigateTiddler(“HelloThere”) so that the history list gets updated alongside the story list.
if (document.querySelector('[type="search"]')){
document.querySelector('[type="search"]').addEventListener('keypress', function (e) {
var key = e.which || e.keyCode;
if (key === 13) {
window.location.hash="%24%3A%2FAdvancedSearch";
}
});
}