From ba40d9a069d64211999ce9c8e28a212c3a3f171e Mon Sep 17 00:00:00 2001 From: MeikTranel Date: Wed, 5 Mar 2014 00:30:36 +0100 Subject: [PATCH] Fixes Issue #83 Countdown no longer triggers, when "#ember1019" aka messagebox is empty. Somehow @zephymastyx removed that exception in #81 should be noted that methodnames for that feature are a little bit confusing when searching for the triggerpoint :D --- chat_filter.user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chat_filter.user.js b/chat_filter.user.js index 65d7f56..a646745 100644 --- a/chat_filter.user.js +++ b/chat_filter.user.js @@ -54,6 +54,7 @@ * /u/redopium * /u/codefusion * /u/Zephymastyx + * /u/anonveggy */ /* global unsafeWindow:false */ @@ -571,7 +572,7 @@ function countdown_input(){ } function update_button(){ -var is_same_input = $(textarea_elem).val() == last_input; + var is_same_input = $(textarea_elem).val() == last_input; var relevant_countdown = is_same_input ? same_input_countdown : input_countdown; var button = $(button_elem); if(relevant_countdown <= 0) @@ -605,6 +606,7 @@ function get_current_input(){ } function update_user_input(){ + if(current_input.trim() == '') return; last_input = current_input; current_input = false; disable_button(input_time_limit);