]> git.sesse.net Git - remoteglot/commitdiff
Add the short score to the document title.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Nov 2014 19:19:38 +0000 (20:19 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 12 Nov 2014 19:19:38 +0000 (20:19 +0100)
www/js/remoteglot.js

index c18349378cd2aac2c592246c9e7d764de5c86da7..9d83e55783168f841119c8666a91333be43e1f32 100644 (file)
@@ -600,6 +600,10 @@ var update_board = function(data, num_viewers) {
        // The score.
        if (data['score'] !== null) {
                $("#score").text(data['score']);
        // The score.
        if (data['score'] !== null) {
                $("#score").text(data['score']);
+               var short_score = data['score'].replace(/Score: */, "");
+               document.title = '(' + short_score + ') analysis.sesse.net';
+       } else {
+               document.title = 'analysis.sesse.net';
        }
 
        // The search stats.
        }
 
        // The search stats.