loleaflet/js/global.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
New commits: commit 3e2ec0854dd730831db1d7a2bd33e397459fc7f1 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue Nov 12 14:49:19 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Fri Nov 15 15:49:52 2019 +0100 loleaflet: add missing parameters when early websocket connection Add some missing parameters when the "websocket" is connected after loleaflet.html while "bundle.js" is downloading and ready to execute. Change-Id: I36995a3c82ce17fa5a81923e8d6d785f0c1c7742 Reviewed-on: https://gerrit.libreoffice.org/82546 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js index ffc0a1d4b..e44d613a6 100644 --- a/loleaflet/js/global.js +++ b/loleaflet/js/global.js @@ -135,18 +135,32 @@ } } + var lang = global.getParameterByName('lang'); global.queueMsg = []; if (window.ThisIsTheiOSApp) - window.LANG = window.getParameterByName('lang'); + window.LANG = lang; if (global.socket && global.socket.readyState !== 3) { global.socket.onopen = function () { if (global.socket.readyState === 1) { var ProtocolVersionNumber = '0.1'; + var timestamp = global.getParameterByName('timestamp'); + var msg = 'load url=' + encodeURIComponent(global.docURL); + global.socket.send('loolclient ' + ProtocolVersionNumber); - if (window.ThisIsTheiOSApp) - global.socket.send('load url=' + encodeURIComponent(global.docURL) + ' lang=' + window.LANG); - else - global.socket.send('load url=' + encodeURIComponent(global.docURL)); + + if (window.ThisIsTheiOSApp) { + msg += ' lang=' + window.LANG; + } else { + + if (timestamp) { + msg += ' timestamp=' + timestamp; + } + if (lang) { + msg += ' lang=' + lang; + } + // renderingOptions? + } + global.socket.send(msg); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits