Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
$#!
 $
A
 addStyle
C
 clone
 close, History
 createExternalLink, Wikifier
 createInternalLink, Wikifier
D
 display, History
E
 easeInOut, Math
F
 fade
 fullArgs, Wikifier
G
 get, Tale
H
 has, Tale
I
 init, History
 insertElement
 insertText
L
 lookup, Tale
M
 main
P
 Passage, Passage
R
 readBracketedList, String
 readMacroParams, String
 removeChildren
 render, Passage
 reset
 restart, History
 restore, History
 rewindTo, History
S
 save, History
 scrollWindowTo
 setPageElement
T
 Tale, Tale
 throwError
 trim, String
U
 unescapeLineBreaks, Passage
W
 Wikifier, Wikifier
function $ (id)
Returns the DOM element with the id passed.
function addStyle (source)
Adds CSS styles to the document.
function clone (original)
Performs a shallow copy of an object.
History.prototype.close = function (passage)
This removes a passage from display onscreen.
Wikifier.createExternalLink = function (place,
url)
Creates a link to an external URL.
Wikifier.createInternalLink = function (place,
title)
Creates a link to a passage.
History.prototype.display = function (title,
link,
render)
Displays a passage on the page.
Math.easeInOut = function (i)
Eases a decimal number from 0 to 1.
function fade (el,
options)
Fades a DOM element in or out.
Wikifier.prototype.fullArgs = function()
Meant to be called by macros, this returns the text passed to the currently executing macro.
Tale.prototype.get = function (key)
A getter function that returns a certain Passage object belonging to the tale.
Tale.prototype.has = function (key)
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).
History.prototype.init = function()
This first attempts to restore the state of the story via the restore method.
function insertElement (place,
type,
id,
className,
text)
A shortcut function for creating a DOM element.
function insertText (place,
text)
Places text in a DOM element.
Tale.prototype.lookup = function(field,
value,
sortField)
Searches the Tale for all passages matching a certain criteria.
function main()
Loads the story from the storage div, initializes macros and custom stylesheets, and displays the first passages of the story.
function Passage (title,
el,
order)
Initializes a new Passage object.
Parses a list of bracketed links -- e.g.
Parses a list of macro parameters.
function removeChildren (el)
Removes all child elements from a DOM element.
Passage.prototype.render = function()
Renders the passage to a DOM element, including its title, toolbar, and content.
Passage.prototype.reset = function()
Resets the passage’s text property to its initialText property.
Tale.prototype.reset = function()
Calls the Passage.reset method on all Passages in the tale, restoring the story to its initial state.
History.prototype.restart = function()
Restarts the story from the beginning.
History.prototype.restore = function ()
Attempts to restore the state of the story as saved by save.
History.prototype.rewindTo = function (passage)
Rewinds the state of the story to a particular Passage.
History.prototype.save = function (passage)
Returns a hash to append to the page’s URL that will be later read by the restore method.
function scrollWindowTo (el)
This scrolls the browser window to ensure that a DOM element is in view.
function setPageElement (id,
title,
defaultText)
Wikifies a passage into a DOM element.
function Tale()
Initializes a new Tale object with the contents of the DOM element with the id storeArea, constructing new Passages as it traverses the tree.
function throwError (place,
message)
Displays an error message on the page.
Removes whitespace from the beginning and end of a string.
Passage.unescapeLineBreaks = function (text)
A static function used by the constructor to convert string literals used by TiddlyWiki to indicate newlines into actual newlines.
function Wikifier(place,
source)
Wikifies source text into a DOM element.