diff --git a/4chan_x.user.js b/4chan_x.user.js index 0ffda93e0..df437db9c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1616,7 +1616,7 @@ } }, interval: function() { - return conf['Interval'] = this.value = this.value.match(/\d+/)[0]; + return conf['Interval'] = this.value = parseInt(this.value) || conf['Interval']; }, update: function() { var arr, body, br, id, input, length, replies, reply, _i, _len, _ref, _ref2; diff --git a/script.coffee b/script.coffee index 2ed95abdc..4df5755f7 100644 --- a/script.coffee +++ b/script.coffee @@ -1320,7 +1320,7 @@ updater = else window.clearInterval updater.intervalID interval: -> - conf['Interval'] = @value = @value.match(/\d+/)[0] + conf['Interval'] = @value = parseInt(@value) or conf['Interval'] update: -> if @status is 404 updater.timer.textContent = ''