From ab7c31c681518427abf17209fb35d841c0ae2100 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 6 May 2020 16:50:03 +0200 Subject: [PATCH] Fix trim history from a pad --- www/common/sframe-common-outer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 0a301fc15..4c240a2ec 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -490,6 +490,13 @@ define([ // Put in the following function the RPC queries that should also work in filepicker var addCommonRpc = function (sframeChan, safe) { + Cryptpad.universal.onEvent.reg(function (data) { + sframeChan.event('EV_UNIVERSAL_EVENT', data); + }); + sframeChan.on('Q_UNIVERSAL_COMMAND', function (data, cb) { + Cryptpad.universal.execCommand(data, cb); + }); + sframeChan.on('Q_ANON_RPC_MESSAGE', function (data, cb) { Cryptpad.anonRpcMsg(data.msg, data.content, function (err, response) { cb({error: err, response: response}); @@ -1374,13 +1381,6 @@ define([ Cryptpad.cursor.execCommand(data, cb); }); - Cryptpad.universal.onEvent.reg(function (data) { - sframeChan.event('EV_UNIVERSAL_EVENT', data); - }); - sframeChan.on('Q_UNIVERSAL_COMMAND', function (data, cb) { - Cryptpad.universal.execCommand(data, cb); - }); - Cryptpad.onTimeoutEvent.reg(function () { sframeChan.event('EV_WORKER_TIMEOUT'); });