From f5823f073c49b1eca792a285583187bc5a5bb234 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 9 Aug 2011 05:03:00 -0700 Subject: [PATCH] shave --- 4chan_x.user.js | 5 ++--- script.coffee | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 49119e87a..21a54faab 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1158,7 +1158,7 @@ }; cooldown = { init: function() { - var form, match, time, _; + var match, time, _; if (match = location.search.match(/cooldown=(\d+)/)) { _ = match[0], time = match[1]; if ($.getValue(g.BOARD + '/cooldown', 0) < time) { @@ -1173,8 +1173,7 @@ return cooldown.start(); } }); - form = $('.postarea form'); - return form.action += '?cooldown'; + return $('.postarea form').action += '?cooldown'; }, start: function() { var submit, _i, _len, _ref; diff --git a/script.coffee b/script.coffee index 05bc7fc69..e14e490fa 100644 --- a/script.coffee +++ b/script.coffee @@ -928,9 +928,7 @@ cooldown = $.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" - - form = $('.postarea form') - form.action += '?cooldown' + $('.postarea form').action += '?cooldown' start: -> cooldown.duration = Math.ceil ($.getValue(g.BOARD+'/cooldown', 0) - Date.now()) / 1000