Skip to content

Commit c6531ef

Browse files
committed
feat: implement listener to send messages when the user press enter
1 parent 4dbee73 commit c6531ef

File tree

1 file changed

+7
-1
lines changed
  • com.developer.nefarious.zjoule.plugin/resources/views

1 file changed

+7
-1
lines changed

com.developer.nefarious.zjoule.plugin/resources/views/scripts.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,10 @@ function finishLoading() {
164164
chatBox.removeChild(loadingIndicator);
165165
}
166166
unblockInput();
167-
}
167+
}
168+
169+
document.addEventListener('keydown', function(event) {
170+
if (event.key === 'Enter') {
171+
sendMessage();
172+
}
173+
});

0 commit comments

Comments
 (0)