From 94d11e957007b6ab3ed5779a865cf3de3e9b3e03 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 19 Nov 2011 00:26:20 -0800 Subject: [PATCH] 15s min update interval --- 4chan_x.user.js | 3 ++- script.coffee | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ad14660fb..70328a4da 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1891,7 +1891,8 @@ } } else if (input.name === 'Interval') { $.on(input, 'change', function() { - return conf['Interval'] = this.value = parseInt(this.value) || conf['Interval']; + if ((val = parseInt(this.value)) < 15) val = 15; + return conf['Interval'] = this.value = val; }); $.on(input, 'change', $.cb.value); } else if (input.type === 'button') { diff --git a/script.coffee b/script.coffee index fa87878b9..b1f7cb2e5 100644 --- a/script.coffee +++ b/script.coffee @@ -1470,7 +1470,10 @@ updater = $.on input, 'click', updater.cb.autoUpdate updater.cb.autoUpdate.call input else if input.name is 'Interval' - $.on input, 'change', -> conf['Interval'] = @value = parseInt(@value) or conf['Interval'] + $.on input, 'change', -> + if (val = parseInt @value) < 15 + val = 15 + conf['Interval'] = @value = val $.on input, 'change', $.cb.value else if input.type is 'button' $.on input, 'click', updater.update