Just as you can tag a passage stylesheet
to have its contents treated as CSS style rules,
you can use the script tag to include custom JavaScript in your story. All passages with this tag
are executed when the page loads, which you can use as an opportunity to do two things:
prompt("Hi! What's your name?");
This example is not particularly useful, but if you are integrating extra JavaScript code into your story, this can be a useful way to do some initialization.
History.prototype.originalDisplay = History.prototype.display;
History.prototype.display = function (title, link, render)
{
if ((render != 'quietly') && (render != 'offscreen'))
removeChildren($('passages'));
this.originalDisplay.apply(this, arguments);
};
The execution order of passages tagged script is not guaranteed.