This commit is contained in:
James Campos 2011-08-09 05:03:00 -07:00
parent b2c789a46c
commit f5823f073c
2 changed files with 3 additions and 6 deletions

View File

@ -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;

View File

@ -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