summaryrefslogtreecommitdiff
path: root/js/auto-reload.js
diff options
context:
space:
mode:
authorMichael Walker <mike@barrucadu.co.uk>2014-05-05 20:54:40 +0100
committerMichael Walker <mike@barrucadu.co.uk>2014-05-05 20:54:40 +0100
commitabaf80fd8ae1b7eea39894339e2af76e7d6c82d3 (patch)
tree360c793f372c839be4f79f5ac20dec240e642b3c /js/auto-reload.js
parent54fdd54e8953c49fc2360af082f8ba3c4f5fc2a2 (diff)
Reset the delay to the minimum upon focussing the window (configurable)
Diffstat (limited to 'js/auto-reload.js')
-rw-r--r--js/auto-reload.js7
1 files changed, 7 insertions, 0 deletions
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;