Merge pull request #86 from webbedspace/master

Interface improvements + new image asset feature + other enhancements
Merge pull request #88 from webbedspace/master

More changes
Merge pull request #89 from webbedspace/master

Further additions
Merge pull request #91 from webbedspace/master

Close-to-final additions
Merge pull request #94 from webbedspace/master

Imminent 1.4.0 release
StoryTitle related changes

* Improved speed of HTML importing.
* Now, only the StoryTitle passage's text content will be used for the
window title, instead of its raw code.
* Now, if a story has no StoryTitle, or the StoryTitle has no text
content, it will default to the name of the .tws file used to build it,
instead of just "Untitled Story".
* Added a sanity check in case a script overrides
History.prototype.display() but doesn't pass enough arguments.
Re-implemented <<textinput>>

* <<textinput>> creates an <input> text element which, when the passage
is left by any means, sets the passed variable to its string contents.
It may also have an additional parameter, a link expressed in link
syntax, which is used to create a <button> next to it.
* The previous <<textinput>> behaviour of triggering the passage change
via the Enter key has been removed for now.
* Added CSS for black textboxes and buttons to Sugarcane.
* IDE tag colours now cycle based on the hash of the tags, to
differentiate dissimilar ones from a distance.
<<radio>>, <<checkbox>>, <<button>>

* Now, <<textinput>> values are only saved if a <button> link is
pressed. Other links discard the values.
* Added <<radio>>. Its arguments are a variable, and a string for the
label. Radio buttons for the same variable are part of the same set. The
label of the selected radio button is put into the variable.
* Added <<checkbox>>. It's similar to <<radio>>, having identical syntax
- but it sets the variable to an array value containing all of the
checked boxes' labels as strings.
* Added <<button>>, a macro that takes a link as its argument and
creates a <button> element. Use it for passages which use <<radio>> or
<<checkbox>>, or a <<textinput>> set.
* Tried to remove a few potential memory leaks.
* Altered Array.prototype.toString slightly, so that people <<print>>ing
arrays get something that makes it a weensy bit more obvious that it's
an array.
* Updated jQuery to 1.11.
Image connector arrows preference

Added a preference for showing the faint connector arrows for image and
stylesheet passages.

Also altered the colour range of passage tags on the story map.
visitedTag() + minor fixes

* Added visitedTag(), which returns the number of times passages with
the given tag have been visited. Provide multiple tags to only search
for passages that contain both.
* Formatting syntax inside link text is once again no longer parsed.
* Added word-break: break-all to #sidebar li, to keep unnaturally long
words from overflowing the sidebar.
* Built HTML files are now timestamped.
Support for multiple strings in <<radio>> etc

* Passing multiple strings to <<radio>> or <<checkbox>> causes
additional input/label element pairs using the same variable to be
rendered. Convenient for making a long list.
* Added restart() as a function alias for History.prototype.restart().
Numerous fixes

* Fixed an error when trying to replace a passage with one from an
imported file.
* Fixed TiddlyWiki emdashes not being rendered correctly.
* Fixed importing from HTML sometimes failing to read passages
correctly.
* Fixed macros.remember.init() crashing due to state not existing yet.
* Reverted the Sugarcane word-break change due to it not working
correctly in Firefox.
* Fixed HTML tables in passages not being constructed correctly.
* Sugarcane: Added warning alert that's displayed if pushState() or
replaceState() throws an error.
* Upped version number to 1.4.1.
Three engine fixes

* Reverted the Array.prototype.toString alteration.
* Fixed <<nobr>> macros inserting troublesome zwsp characters into
nested macros' arguments.
* Fixed the [img] syntax used in CSS stylesheets inserting a terminating
semicolon, preventing further attributes from being used on the same
line.
* [Note for previous commit] Re-instated syntax parsing for link text
again.
Altered Sugarcane history to use SessionStorage

One problem with storing past history states using
window.history.pushState() is that Firefox places a 640kb limit on the
data passed to it - a limit which could crash a Twine game with many
variables and data structures. This is actually for good reason - web
apps with heavy state should invoke SessionStorage rather than just
pushing it to browser history. So, SessionStorage usage has now been
implemented.
Small fix to previous commit

Accidentally broke setter links.
Link arrows for shorthand <<display>> macros

Passages invoked through shorthand <<display>> macros now also cause
corresponding arrows to be drawn on the passage map. These invocation
macro tags are also syntax-highlit blue.

Also fixed unmatched <<endif>> and <<endsilently>> macros not being
coloured red.
Three sly fixes

* Fixed external links crashing.
* Fixed "Import from HTML" choking on passages with no text.
* Fixed <<endnobr>> consuming the three characters that come after it.
* As an extra fallback, window.onerror is now set to issue a one-time
alert() signifying that all is not well.
Image preloading + Responsive changes

* Inserted engine code that causes external images to be preloaded, in
case people still want to use external images for whatever reason.
* Removed Responsive's Respond.js polyfill, because it doesn't work too
well with Twine's dynamically inserted stylesheets, and it's unlikely
most people will even use it.
* Changed Responsive's footer to a sticky footer, like God and all His
hideous bat-faced angels originally intended.
IE8 External Link Fix

* Fixed IE8 crashing when full URL external links are used.
* Altered Responsive's CSS to make the body background easier to change.
Merge branch 'master' of git://github.com/tweecode/twine into tweecode