From abaf80fd8ae1b7eea39894339e2af76e7d6c82d3 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Mon, 5 May 2014 20:54:40 +0100 Subject: Reset the delay to the minimum upon focussing the window (configurable) --- js/auto-reload.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/auto-reload.js') diff --git a/js/auto-reload.js b/js/auto-reload.js index fa856bd9..4a872024 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -56,6 +56,13 @@ $(document).ready(function(){ $(window).focus(function() { window_active = true; recheck_activated(); + + // Reset the delay if needed + if(settings.get('reset_focus', true)) { + poll_interval_delay = end_of_page + ? poll_interval_mindelay_bottom + : poll_interval_mindelay_top; + } }); $(window).blur(function() { window_active = false; -- cgit v1.3