Make updater interval increase optional
This commit is contained in:
parent
fbdc001519
commit
7e3324480a
@ -183,7 +183,8 @@
|
|||||||
'Auto Scroll': [false, 'Scroll updated posts into view. Only enabled at bottom of page.'],
|
'Auto Scroll': [false, 'Scroll updated posts into view. Only enabled at bottom of page.'],
|
||||||
'Bottom Scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.'],
|
'Bottom Scroll': [false, 'Always scroll to the bottom, not the first new post. Useful for event threads.'],
|
||||||
'Scroll BG': [false, 'Auto-scroll background tabs.'],
|
'Scroll BG': [false, 'Auto-scroll background tabs.'],
|
||||||
'Auto Update': [true, 'Automatically fetch new posts.']
|
'Auto Update': [true, 'Automatically fetch new posts.'],
|
||||||
|
'Optional Increase': [false, 'Increase the intervals between updates on threads without new posts.']
|
||||||
},
|
},
|
||||||
'Interval': 30
|
'Interval': 30
|
||||||
}
|
}
|
||||||
@ -5648,7 +5649,7 @@
|
|||||||
},
|
},
|
||||||
interval: function() {
|
interval: function() {
|
||||||
var val;
|
var val;
|
||||||
val = Math.max(5, parseInt(this.value, 10));
|
val = parseInt(this.value, 10);
|
||||||
ThreadUpdater.interval = this.value = val;
|
ThreadUpdater.interval = this.value = val;
|
||||||
return $.cb.value.call(this);
|
return $.cb.value.call(this);
|
||||||
},
|
},
|
||||||
@ -5695,7 +5696,7 @@
|
|||||||
if (!d.hidden) {
|
if (!d.hidden) {
|
||||||
j = Math.min(j, 7);
|
j = Math.min(j, 7);
|
||||||
}
|
}
|
||||||
return ThreadUpdater.seconds = Math.max(i, [0, 5, 10, 15, 20, 30, 60, 90, 120, 240, 300][j]);
|
return ThreadUpdater.seconds = Conf['Optional Increase'] ? Math.max(i, [0, 5, 10, 15, 20, 30, 60, 90, 120, 240, 300][j]) : i;
|
||||||
},
|
},
|
||||||
set: function(name, text, klass) {
|
set: function(name, text, klass) {
|
||||||
var el, node;
|
var el, node;
|
||||||
|
|||||||
@ -465,4 +465,8 @@ http://www.google.com/searchbyimage?image_url=%turl
|
|||||||
true
|
true
|
||||||
'Automatically fetch new posts.'
|
'Automatically fetch new posts.'
|
||||||
]
|
]
|
||||||
|
'Optional Increase': [
|
||||||
|
false
|
||||||
|
'Increase the intervals between updates on threads without new posts.'
|
||||||
|
]
|
||||||
'Interval': 30
|
'Interval': 30
|
||||||
|
|||||||
@ -3815,7 +3815,7 @@ ThreadUpdater =
|
|||||||
else
|
else
|
||||||
clearTimeout ThreadUpdater.timeoutID
|
clearTimeout ThreadUpdater.timeoutID
|
||||||
interval: ->
|
interval: ->
|
||||||
val = Math.max 5, parseInt @value, 10
|
val = parseInt @value, 10
|
||||||
ThreadUpdater.interval = @value = val
|
ThreadUpdater.interval = @value = val
|
||||||
$.cb.value.call @
|
$.cb.value.call @
|
||||||
load: ->
|
load: ->
|
||||||
@ -3857,7 +3857,11 @@ ThreadUpdater =
|
|||||||
unless d.hidden
|
unless d.hidden
|
||||||
# Lower the max refresh rate limit on visible tabs.
|
# Lower the max refresh rate limit on visible tabs.
|
||||||
j = Math.min j, 7
|
j = Math.min j, 7
|
||||||
ThreadUpdater.seconds = Math.max i, [0, 5, 10, 15, 20, 30, 60, 90, 120, 240, 300][j]
|
ThreadUpdater.seconds =
|
||||||
|
if Conf['Optional Increase']
|
||||||
|
Math.max i, [0, 5, 10, 15, 20, 30, 60, 90, 120, 240, 300][j]
|
||||||
|
else
|
||||||
|
i
|
||||||
|
|
||||||
set: (name, text, klass) ->
|
set: (name, text, klass) ->
|
||||||
el = ThreadUpdater[name]
|
el = ThreadUpdater[name]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user