From c7559f1b04a768a107124fc4b68bebc7db039d97 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 13 Apr 2016 12:49:19 -0400 Subject: [PATCH] Added checkmark/x instead of SAVED/UNSAVED Former-commit-id: 9c94107d3b7c2be9d68304e09e4a6900629dacff [formerly 1918e7a3c24ceb2c3fab7fdb0acda24019626562] [formerly 76acd89f5890a1f75bd3044f6036d2336dfe4a45 [formerly 04424b566ee634bd4acefd390df56d944cfa90cb]] Former-commit-id: 541e213cbad1ea30454782ac3d184d3cc94921a6 [formerly 757c1eb7d14d6fea74b4aed860d6d850a8600f22] Former-commit-id: 3fbceea2234e5879e7d6e18c992b678fe1012b3b --- static/js/websockets.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/websockets.js b/static/js/websockets.js index 01f8a58..996e6a2 100644 --- a/static/js/websockets.js +++ b/static/js/websockets.js @@ -6,7 +6,7 @@ $(document).ready(function() { var updateInterval; var uhohTimer; var doneTypingInterval = 500; //time in ms, 5 second for example - var pollToGetNewestCopyInterval = 10000; + var pollToGetNewestCopyInterval = 20000; //on keyup, start the countdown $('#emit').keyup(function() { clearTimeout(typingTimer); @@ -20,7 +20,7 @@ $(document).ready(function() { clearTimeout(typingTimer); clearInterval(updateInterval); $('#saveInfo').removeClass().addClass("glyphicon glyphicon-floppy-remove"); - document.title = "[UNSAVED] " + title_name; + document.title = '✗ ' + title_name; }); //user is "finished typing," do something @@ -31,7 +31,7 @@ $(document).ready(function() { $('#saveInfo').removeClass().addClass("glyphicon glyphicon-floppy-open"); console.log("Done typing") updateInterval = setInterval(updateText, pollToGetNewestCopyInterval); - document.title = "[SAVED] " + title_name; + document.title = "✓ " + title_name; if (currentText().indexOf("self-destruct\n") > -1 || currentText().indexOf("\nself-destruct") > -1) { if (selfDestruct == false) { selfDestruct = true; @@ -72,7 +72,7 @@ $(document).ready(function() { if (data.UpdateClient == true) { console.log("Updating...") $('#emit_data').val(data.TextData) - document.title = "[LOADED] " + title_name; + document.title = " " + title_name; } console.log((data.TextData == "saved")) console.log(data.TextData)