From a177a622c4ee3bad22b059781cde25ba1cf07fb9 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 6 Dec 2021 16:12:47 -0500 Subject: [PATCH] chat: Move chat-specific pad HTML to `eejsBlock_*` hook functions --- src/ep.json | 4 ++++ src/node/chat.js | 44 +++++++++++++++++++++++++++++++++++++++++ src/templates/pad.html | 45 +++++------------------------------------- 3 files changed, 53 insertions(+), 40 deletions(-) create mode 100644 src/node/chat.js diff --git a/src/ep.json b/src/ep.json index da2bd8ad2..50c730e05 100644 --- a/src/ep.json +++ b/src/ep.json @@ -19,6 +19,10 @@ "handleClientMessage_CHAT_MESSAGE": "ep_etherpad-lite/static/js/chat", "handleClientMessage_CHAT_MESSAGES": "ep_etherpad-lite/static/js/chat", "postAceInit": "ep_etherpad-lite/static/js/chat" + }, + "hooks": { + "eejsBlock_mySettings": "ep_etherpad-lite/node/chat", + "eejsBlock_stickyContainer": "ep_etherpad-lite/node/chat" } }, { diff --git a/src/node/chat.js b/src/node/chat.js new file mode 100644 index 000000000..02a863e9e --- /dev/null +++ b/src/node/chat.js @@ -0,0 +1,44 @@ +'use strict'; + +exports.eejsBlock_mySettings = (hookName, context) => { + context.content += ` +

+ + +

+

+ + +

+ `; +}; + +exports.eejsBlock_stickyContainer = (hookName, context) => { + /* eslint-disable max-len */ + context.content += ` +
+ + + 0 +
+
+
+
+

+ + █   +
+
+
+ +
+
+
+ +
+
+
+
+ `; + /* eslint-enable max-len */ +}; diff --git a/src/templates/pad.html b/src/templates/pad.html index b1f033f59..84a99f3de 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -112,23 +112,15 @@ - - - + + + - - - - - -
- - - 0 -
- -
-
-
-

- - █   -
-
-
- -
-
-
- -
-
-
-
+ <% e.end_block(); %>