From a6589d0d06dc58c5c20ce668d0a1063b3007f3a5 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 22 Nov 2019 17:58:21 +0100 Subject: [PATCH] Ability to restore an old version from the debug app --- www/debug/inner.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/debug/inner.js b/www/debug/inner.js index 3373b4803..03e4d8d7f 100644 --- a/www/debug/inner.js +++ b/www/debug/inner.js @@ -439,7 +439,12 @@ define([ console.log(doc); }; - config.onLocal = function () { }; + var toRestore; + + config.onLocal = function () { + if (!toRestore) { return; } + cpNfInner.chainpad.contentUpdate(toRestore); + }; config.onInit = function (info) { Title = common.createTitle({}); @@ -463,6 +468,7 @@ define([ onRemote: config.onRemote, setHistory: setHistory, applyVal: function (val) { + toRestore = val; displayDoc(JSON.parse(val) || {}); }, $toolbar: $bar,