if (!offline_mode) setTimeout("timeout()", 1);
+ setTimeout("hotkey_prefix_timeout()", 5*1000);
+
if (typeof correctPNG != 'undefined') {
correctPNG();
}
var sanity_check_done = false;
var _hfd_scrolltop = 0;
var hotkey_prefix = false;
+var hotkey_prefix_pressed = false;
var init_params = new Object();
var ver_offset = 0;
var hor_offset = 0;
f.viewfeed(feed, subop);
}
+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;
+ }
+
+ setTimeout("hotkey_prefix_timeout()", 10);
+
+ } catch (e) {
+ exception_error("hotkey_prefix_timeout", e);
+ }
+}
+
function timeout() {
if (getInitParam("bw_limit") == "1") return;
if ((keycode == 70 || keycode == 67 || keycode == 71)
&& !hotkey_prefix) {
+ var date = new Date();
+ var ts = Math.round(date.getTime() / 1000);
+
hotkey_prefix = keycode;
- debug("KP: PREFIX=" + keycode + " CHAR=" + keychar);
+ hotkey_prefix_pressed = ts;
+ debug("KP: PREFIX=" + keycode + " CHAR=" + keychar + " TS=" + ts);
return true;
}