mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
Reset the delay to the minimum upon focussing the window (configurable)
This commit is contained in:
parent
54fdd54e89
commit
abaf80fd8a
@ -56,6 +56,13 @@ $(document).ready(function(){
|
|||||||
$(window).focus(function() {
|
$(window).focus(function() {
|
||||||
window_active = true;
|
window_active = true;
|
||||||
recheck_activated();
|
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).blur(function() {
|
||||||
window_active = false;
|
window_active = false;
|
||||||
|
@ -61,5 +61,7 @@ tb_settings['auto-reload'] = {
|
|||||||
// Maximum delay before reloading the page
|
// Maximum delay before reloading the page
|
||||||
max_delay: 600000,
|
max_delay: 600000,
|
||||||
//Delay to wait before reloading when the user scrolls to the bottom
|
//Delay to wait before reloading when the user scrolls to the bottom
|
||||||
quick_delay: 100
|
quick_delay: 100,
|
||||||
|
// Reset the delay to the minimum upon focussing the window.
|
||||||
|
reset_focus: true
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user