Reset the delay to the minimum upon focussing the window (configurable)

This commit is contained in:
Michael Walker 2014-05-05 20:54:40 +01:00
parent 54fdd54e89
commit abaf80fd8a
2 changed files with 10 additions and 1 deletions

View file

@ -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;