From b58698b257fb6552e053cd245d63a140d3f7a478 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sun, 27 Apr 2014 16:55:31 -0500 Subject: JS: add localStorage history load/save. Slurp using sync XHR. --- mal.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mal.html') diff --git a/mal.html b/mal.html index 3bc5b21..89d9c41 100644 --- a/mal.html +++ b/mal.html @@ -208,6 +208,8 @@ this software. rep("(println (str \"Mal [\" *host-language* \"]\"))"); + jq_load_history(jqconsole); + // Abort prompt on Ctrl+C. jqconsole.RegisterShortcut('C', function() { jqconsole.AbortPrompt(); @@ -240,6 +242,7 @@ this software. jqconsole.Write(exc + '\n', 'jqconsole-error'); } } + jq_save_history(jqconsole); } jqconsole.Prompt(true, handler); /* -- cgit v1.2.3