From 2146358b19d0acbb6949b9637b1e3c85a79c5393 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 24 Nov 2011 00:52:21 +0100 Subject: [PATCH] Parse values as decimals, 010 -> 10 not 8. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index a219b3475..64746ad2a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1890,7 +1890,7 @@ } } else if (input.name === 'Interval') { $.on(input, 'change', function() { - return conf['Interval'] = this.value = parseInt(this.value) || conf['Interval']; + return conf['Interval'] = this.value = parseInt(this.value, 10) || conf['Interval']; }); $.on(input, 'change', $.cb.value); } else if (input.type === 'button') { diff --git a/script.coffee b/script.coffee index 4a4eb8429..f448c1567 100644 --- a/script.coffee +++ b/script.coffee @@ -1469,7 +1469,7 @@ 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', -> conf['Interval'] = @value = parseInt(@value, 10) or conf['Interval'] $.on input, 'change', $.cb.value else if input.type is 'button' $.on input, 'click', updater.update