From 1526c26f8ed87eb62bb8431293922b218164d41c Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 21 Jun 2016 18:49:37 +0200 Subject: [PATCH] remember code and wysiwyg pads --- www/code/main.js | 12 +----------- www/pad/main.js | 1 + www/render/main.js | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/www/code/main.js b/www/code/main.js index 5ddc02801..65ad0afe7 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -26,17 +26,6 @@ define([ toolbar; var secret = Cryptpad.getSecrets(); -/* - var key; - var channel = ''; - var hash = false; - if (!/#/.test(window.location.href)) { - key = Crypto.genKey(); - } else { - hash = window.location.hash.slice(1); - channel = hash.slice(0, 32); - key = hash.slice(32); - }*/ var andThen = function (CMeditor) { var $pad = $('#pad-iframe'); @@ -156,6 +145,7 @@ define([ $bar.find('#cryptpad-saveContent').click(exportText); window.location.hash = info.channel + secret.key; + Cryptpad.rememberPad(); }; var updateUserList = function(shjson) { diff --git a/www/pad/main.js b/www/pad/main.js index bc19c1862..186079949 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -324,6 +324,7 @@ define([ // set the hash window.location.hash = info.channel + secret.key; + Cryptpad.rememberPad(); }; // this should only ever get called once, when the chain syncs diff --git a/www/render/main.js b/www/render/main.js index d209bba40..ba41f9f96 100644 --- a/www/render/main.js +++ b/www/render/main.js @@ -45,7 +45,6 @@ define([ var patches = (DD).diff(inner, New); DD.apply(inner, patches); - Previous = New; return patches; }; }());