shave
This commit is contained in:
parent
b2c789a46c
commit
f5823f073c
@ -1158,7 +1158,7 @@
|
|||||||
};
|
};
|
||||||
cooldown = {
|
cooldown = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var form, match, time, _;
|
var match, time, _;
|
||||||
if (match = location.search.match(/cooldown=(\d+)/)) {
|
if (match = location.search.match(/cooldown=(\d+)/)) {
|
||||||
_ = match[0], time = match[1];
|
_ = match[0], time = match[1];
|
||||||
if ($.getValue(g.BOARD + '/cooldown', 0) < time) {
|
if ($.getValue(g.BOARD + '/cooldown', 0) < time) {
|
||||||
@ -1173,8 +1173,7 @@
|
|||||||
return cooldown.start();
|
return cooldown.start();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
form = $('.postarea form');
|
return $('.postarea form').action += '?cooldown';
|
||||||
return form.action += '?cooldown';
|
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
var submit, _i, _len, _ref;
|
var submit, _i, _len, _ref;
|
||||||
|
|||||||
@ -928,9 +928,7 @@ cooldown =
|
|||||||
$.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
|
cooldown.start() if Date.now() < $.getValue g.BOARD+'/cooldown', 0
|
||||||
$.bind window, 'storage', (e) -> cooldown.start() if e.key is "#{NAMESPACE}#{g.BOARD}/cooldown"
|
$.bind window, 'storage', (e) -> cooldown.start() if e.key is "#{NAMESPACE}#{g.BOARD}/cooldown"
|
||||||
|
$('.postarea form').action += '?cooldown'
|
||||||
form = $('.postarea form')
|
|
||||||
form.action += '?cooldown'
|
|
||||||
|
|
||||||
start: ->
|
start: ->
|
||||||
cooldown.duration = Math.ceil ($.getValue(g.BOARD+'/cooldown', 0) - Date.now()) / 1000
|
cooldown.duration = Math.ceil ($.getValue(g.BOARD+'/cooldown', 0) - Date.now()) / 1000
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user