X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=rogue_chat.html;h=e2cd53c43c3333e2d27f45815e124e58c752c170;hb=eb000b9ee11d2bf17ac3e70b62631c51bb24ee11;hp=6497fa9a1832262b612abf203a9c06cdad0a7dfd;hpb=1ece82099bbf02faed3d1348d7014b8ed38528a9;p=plomrogue2
diff --git a/rogue_chat.html b/rogue_chat.html
index 6497fa9..e2cd53c 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -1768,7 +1768,10 @@ window.setInterval(function() {
}, 1000);
window.setInterval(function() {
if (document.activeElement.tagName.toLowerCase() != 'input') {
+ const scroll_x = window.scrollX;
+ const scroll_y = window.scrollY;
tui.inputEl.focus();
+ window.scrollTo(scroll_x, scroll_y);
};
}, 100);
document.getElementById("help").onclick = function() {
@@ -1804,6 +1807,9 @@ document.getElementById("install").onclick = function() {
document.getElementById("wear").onclick = function() {
server.send(['TASK:WEAR']);
};
+document.getElementById("spin").onclick = function() {
+ server.send(['TASK:SPIN']);
+};
document.getElementById("dance").onclick = function() {
server.send(['TASK:DANCE']);
};