From f6c5ce606e4972e2dc8c8546dccb8e64b648fdf3 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 28 Oct 2021 16:04:23 -0400 Subject: [PATCH] pad: Move UI setup from `handshake()` to `init()` --- src/static/js/pad.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 1aabc18a3..92b38963e 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -366,12 +366,6 @@ const handshake = () => { pad.collabClient.handleMessageFromServer(obj); } }); - // Bind the colorpicker - $('#colorpicker').farbtastic({callback: '#mycolorpickerpreview', width: 220}); - // Bind the read only button - $('#readonlyinput').on('click', () => { - padeditbar.setEmbedLinks(); - }); }; const pad = { @@ -401,6 +395,9 @@ const pad = { $(document).ready(() => { if (window.customStart != null) window.customStart(); + $('#colorpicker').farbtastic({callback: '#mycolorpickerpreview', width: 220}); + $('#readonlyinput').on('click', () => { padeditbar.setEmbedLinks(); }); + handshake(); // To use etherpad you have to allow cookies.