mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
this fixes #346
This commit is contained in:
parent
08224b8e14
commit
eeca7cb41f
1 changed files with 10 additions and 5 deletions
|
|
@ -728,16 +728,21 @@ var reloadTab = function() {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
var onMaxEntriesChanged = function() {
|
var onMaxEntriesChanged = function() {
|
||||||
var raw = uDom(this).val();
|
var input = this;
|
||||||
try {
|
try {
|
||||||
maxEntries = parseInt(raw, 10);
|
maxEntries = parseInt(input.value, 10);
|
||||||
if ( isNaN(maxEntries) ) {
|
if ( maxEntries === 0 || isNaN(maxEntries) ) {
|
||||||
maxEntries = 0;
|
maxEntries = 1000;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
maxEntries = 0;
|
maxEntries = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maxEntries = Math.min(maxEntries, 5000);
|
||||||
|
maxEntries = Math.max(maxEntries, 10);
|
||||||
|
|
||||||
|
input.value = maxEntries.toString(10);
|
||||||
|
|
||||||
messager.send({
|
messager.send({
|
||||||
what: 'userSettings',
|
what: 'userSettings',
|
||||||
name: 'requestLogMaxEntries',
|
name: 'requestLogMaxEntries',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue