pad: Move UI setup from `handshake()` to `init()`

pull/5252/head
Richard Hansen 2021-10-28 16:04:23 -04:00
parent bd44a87388
commit f6c5ce606e
1 changed files with 3 additions and 6 deletions

View File

@ -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.