ansilove.js

A script to display ANSi and artscene related file formats on web pages
Log | Files | Refs | README | LICENSE

commit b43d7a61d48275a40050fd97f36560a7e0c36654
parent 08549403d6ff615dd1424e94e2e850d01f042080
Author: Andy Herbert <andy.herbert@gmail.com>
Date:   Sun, 27 Oct 2013 13:30:15 +0000

Added option to stop the current animation.

Diffstat:
Mansilove.js | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/ansilove.js b/ansilove.js @@ -1542,6 +1542,10 @@ var AnsiLove = (function () { } drawChunk(); }, + "stop": function () { + clearTimeout(timer); + clearInterval(interval); + }, "load": function (bytes, callback) { clearTimeout(timer); file = new File(bytes); @@ -1563,6 +1567,9 @@ var AnsiLove = (function () { "play": function (baud, callback, clearScreen) { ansimation.play(baud, callback, clearScreen); }, + "stop": function () { + ansimation.stop(); + }, "load": function (url, callback, callbackFail) { httpGet(url, function (bytes) { ansimation.load(bytes, callback);