From cdc3e8086159eb23a15c7db4ef4ed9afc1fb608a Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Fri, 23 Feb 2018 21:08:20 +0000 Subject: [PATCH] Notice if sending messages over 350 char --- webapp/titanembeds/static/js/embed.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index c512f8e..5f2d7b1 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -1459,6 +1459,8 @@ $("#messagebox").attr('readonly', false); $("#messagebox").focus(); }); + } else if (event.keyCode == 13 && !shift_pressed && $(this).val().length <= 350) { + Materialize.toast('You are sending messages too long! 350 characters limit.', 10000); } });