Skip to content

"Programmatic Undo": Snowman (v1.3.0)#

Information

Checkpoints will only affect properties of the s (state) global variable in Snowman.

Summary#

Snowman comes with no user-facing functionality for undoing and re-doing actions. However, though using jQuery and a combination of the window.story.checkpoint() and window.history.back()* functions, this can be emulated.

Live Example#

Download

Twee Code#

:: StoryTitle
Programmatic Undo in Snowman

:: UserScript[script]
$(window).on('showpassage:after', function (e, data)
{
    window.story.checkpoint(data.passage.name);
});

:: Start
[[Enter the Darkness]]

:: Enter the Darkness
<a href="javascript: window.history.back();">You are not ready! Go back!</a>

Twee Download