diff --git a/package.json b/package.json
index b12259c..6517e9e 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,6 @@
"license": "MIT",
"dependencies": {
"express": "^4.14.0",
- "morgan": "^1.7.0",
"socketio": "^1.0.0",
"toml": "^2.3.0"
},
diff --git a/public/index.html b/public/index.html
index 4c2f5f1..3c64b15 100644
--- a/public/index.html
+++ b/public/index.html
@@ -61,17 +61,20 @@
Teemant Settings
Chat
-
Shared input field
+
+
Input
+
+
Colors
-
Enable colored messages
-
Color nicknames
-
Color nicknames in the user list
+
+
+
Timestamps
-
Enable timestamps on messages
-
-
+
+
+
`hh:mm:ss TT
` would be 12-hour format with PM/AM
-
Themes
+
Themes
diff --git a/public/js/main.js b/public/js/main.js
index 18070cf..6b9eedc 100644
--- a/public/js/main.js
+++ b/public/js/main.js
@@ -8,12 +8,14 @@ window.irc = {
timestampFormat: "HH:mm:ss",
colorNicknames: true,
colorNicklist: false,
+ scrollOnResize: true,
+ scrollOnFocus: true,
theme: "default"
},
serverData: {},
serverChatQueue: {},
chatType: "simple",
- documentTitle: "TeemantIRC"
+ documentTitle: "TeemantIRC",
};
window.clientdom = {connector: {}, settings: {}};
@@ -1317,6 +1319,11 @@ class InputHandler {
this.keyDownHandle(e, key);
}
+ clientdom.input.onfocus = (e) => {
+ if(irc.config.scrollOnFocus)
+ clientdom.letterbox.scrollTop = clientdom.letterbox.scrollHeight;
+ }
+
clientdom.send.onclick = (e) => {
this.handleInput();
}
@@ -1845,6 +1852,11 @@ function parseURL() {
window.onpopstate = parseURL;
+window.onresize = function() {
+ if(irc.config.scrollOnResize)
+ clientdom.letterbox.scrollTop = clientdom.letterbox.scrollHeight;
+}
+
window.onload = function() {
irc.primaryFrame = document.querySelector('.ircclient');