aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/TermsOfService.md2
-rw-r--r--view/tpl/chat.tpl17
2 files changed, 18 insertions, 1 deletions
diff --git a/doc/TermsOfService.md b/doc/TermsOfService.md
index 3586b5d82..41e9c0de7 100644
--- a/doc/TermsOfService.md
+++ b/doc/TermsOfService.md
@@ -1,4 +1,4 @@
Terms of Service
================
-#include SiteTOS;
+#include doc/SiteTOS.md;
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 0ebe879a1..a0c18f8d6 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -89,3 +89,20 @@ function update_chats(chats) {
}
</script>
+<script>
+function isMobile() {
+ try{ document.createEvent("TouchEvent"); return true; }
+ catch(e){ return false; }
+}
+$(function(){
+
+ $('#chatText').keypress(function(e){
+ if (e.keyCode == 13 && e.shiftKey||isMobile()) {
+ }
+ else if (e.keyCode == 13) {
+ e.preventDefault();
+ $(this).parent('form').trigger('submit');
+ }
+ });
+});
+</script>