]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
display active hotkey prefix on screen
[tt-rss.git] / functions.js
index 1e28f1392c27758358f8f8db427957b4ae660210..6ab23b0f2b55022c8b806094414f40b50aa819d4 100644 (file)
@@ -2169,3 +2169,25 @@ function html5AudioOrFlash(type) {
                }
        }
 } */
+
+function hotkey_prefix_timeout() {
+       try {
+
+               var date = new Date();
+               var ts = Math.round(date.getTime() / 1000);
+
+               if (hotkey_prefix_pressed && ts - hotkey_prefix_pressed >= 5) {
+                       debug("hotkey_prefix seems to be stuck, aborting");
+                       hotkey_prefix_pressed = false;
+                       hotkey_prefix = false;
+                       Element.hide('cmdline');
+               }
+
+               setTimeout("hotkey_prefix_timeout()", 1000);
+
+       } catch  (e) {
+               exception_error("hotkey_prefix_timeout", e);
+       }
+}
+
+