Returns the DOM element with the id passed.
Adds CSS styles to the document.
Performs a shallow copy of an object.
This removes a passage from display onscreen.
Creates a link to an external URL.
Creates a link to a passage.
Displays a passage on the page.
Eases a decimal number from 0 to 1.
Fades a DOM element in or out.
Meant to be called by macros, this returns the text passed to the currently executing macro.
A getter function that returns a certain Passage object belonging to the tale.
Checks whether the tale has a passage with either the title passed (if the key parameter is a string) or an id (if a number is passed instead).
A class used to manage the state of the story -- displaying new passages and rewinding to the past.
An array representing the state of the story.
An internal id of the passage.
This first attempts to restore the state of the story via the restore method.
The initial text of the passage.
A shortcut function for creating a DOM element.
Places text in a DOM element.
Searches the Tale for all passages matching a certain criteria.
Loads the story from the storage div, initializes macros and custom stylesheets, and displays the first passages of the story.
This class represents an individual passage.
Initializes a new Passage object.
An associative array of Passage objects in the story.
Parses a list of bracketed links -- e.g.
Parses a list of macro parameters.
Removes all child elements from a DOM element.
Renders the passage to a DOM element, including its title, toolbar, and content.
Resets the passage’s text property to its initialText property.
Calls the Passage.reset method on all Passages in the tale, restoring the story to its initial state.
Restarts the story from the beginning.
Attempts to restore the state of the story as saved by save.
Rewinds the state of the story to a particular Passage.
Returns a hash to append to the page’s URL that will be later read by the restore method.
This scrolls the browser window to ensure that a DOM element is in view.
Wikifies a passage into a DOM element.
An array of strings, each corresponding to a tag the passage belongs to.
Used to provide access to passages.
Initializes a new Tale object with the contents of the DOM element with the id storeArea, constructing new Passages as it traverses the tree.
The current text of the passage.
Displays an error message on the page.
The title of the passage, displayed at its top.
Removes whitespace from the beginning and end of a string.
A static function used by the constructor to convert string literals used by TiddlyWiki to indicate newlines into actual newlines.
Used to display text on the page.
Wikifies source text into a DOM element.