diff --git a/4chan_x.user.js b/4chan_x.user.js index 695f9c9ed..c70639895 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1147,7 +1147,7 @@ var input, time, _, _ref; if (location.search) { _ref = location.search.match(/cooldown=(\d+)/), _ = _ref[0], time = _ref[1]; - if ($.getValue(g.BOARD + '/cooldown', 0 < time)) { + if ($.getValue(g.BOARD + '/cooldown', 0) < time) { $.setValue(g.BOARD + '/cooldown', time); } } @@ -1161,7 +1161,7 @@ }); input = $('.postarea input[name=email]'); if (/sage/i.test(input.value)) { - $('.postarea form').action = "http://sys.4chan.org/" + g.BOARD + "/post?sage"; + $('.postarea form').action += "?sage"; } return $.bind(input, 'keyup', cooldown.sage); }, diff --git a/script.coffee b/script.coffee index b91192747..4e0a2e6d0 100644 --- a/script.coffee +++ b/script.coffee @@ -913,13 +913,13 @@ cooldown = init: -> if location.search [_, time] = location.search.match /cooldown=(\d+)/ - $.setValue g.BOARD+'/cooldown', time if $.getValue g.BOARD+'/cooldown', 0 < time + $.setValue g.BOARD+'/cooldown', time if $.getValue(g.BOARD+'/cooldown', 0) < time cooldown.start() if Date.now() < $.getValue g.BOARD+'/cooldown', 0 $.bind window, 'storage', (e) -> cooldown.start() if e.key is "#{NAMESPACE}#{g.BOARD}/cooldown" input = $('.postarea input[name=email]') if /sage/i.test input.value - $('.postarea form').action = "http://sys.4chan.org/#{g.BOARD}/post?sage" + $('.postarea form').action += "?sage" $.bind input, 'keyup', cooldown.sage sage: ->