]> git.sesse.net Git - ultimatescore/blobdiff - score.js
Add an option (default on) to autoshow comment when time goes out.
[ultimatescore] / score.js
index 273a311896ee3712ef8c87bc48d7971b4ab01f80..b25a61105f936af49b18ad2f9a9754fb080bb155 100644 (file)
--- a/score.js
+++ b/score.js
@@ -213,6 +213,13 @@ function time_elapsed_raw()
                clock_elapsed = clock_limit;
                clock_origin = Date.now();
                clock_running = false;
+
+               if (state['autocomment_on_clock_limit'] == '1' && !comment_visible) {
+                       state['comment'] = state['autocomment'];
+                       setcomment();
+                       showcomment();
+               }
+
                return clock_limit;
        }
        return clock_elapsed + elapsed;