From ba44a26961a944cdd76df361f727a78be0f43e44 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 28 Sep 2014 14:04:23 +0300 Subject: history: save json as text editor viewable --- scripts/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/history.js b/scripts/history.js index 03c9f4a1..4e95164a 100644 --- a/scripts/history.js +++ b/scripts/history.js @@ -43,7 +43,7 @@ History.prototype.save_to_file = function() { // TODO: filename and chrome support (grep json;base64 for other locations) // perhaps has to wait for FileWriter api? - location.href = 'data:text/json;base64,' + window.btoa(JSON.stringify(this.records)); + location.href = 'data:text/json;base64,' + window.btoa(JSON.stringify(this.records, function (k, v) { return v; }, 2)); }; History.prototype.clear_history = function() -- cgit v1.3.1