Disable auto-posting if you're writing during the last 5 seconds of the cooldown. Close #205.
This commit is contained in:
parent
1cec99ba8f
commit
c696916e60
@ -1843,7 +1843,10 @@
|
|||||||
for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) {
|
for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) {
|
||||||
event = _ref3[_k];
|
event = _ref3[_k];
|
||||||
$.on(input, event, function() {
|
$.on(input, event, function() {
|
||||||
return qr.selected[this.name] = this.value;
|
qr.selected[this.name] = this.value;
|
||||||
|
if (qr.cooldown.auto && qr.selected === qr.replies[0] && parseInt(qr.status.input.value.match(/\d+/)) < 6) {
|
||||||
|
return qr.cooldown.auto = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1491,7 +1491,12 @@ qr =
|
|||||||
for name in ['name', 'email', 'sub', 'com']
|
for name in ['name', 'email', 'sub', 'com']
|
||||||
input = $ "[name=#{name}]", qr.el
|
input = $ "[name=#{name}]", qr.el
|
||||||
for event in ['textInput', 'keyup', 'change', 'paste']
|
for event in ['textInput', 'keyup', 'change', 'paste']
|
||||||
$.on input, event, -> qr.selected[@name] = @value
|
$.on input, event, ->
|
||||||
|
qr.selected[@name] = @value
|
||||||
|
# Disable auto-posting if you're typing in the first reply
|
||||||
|
# during the last 5 seconds of the cooldown.
|
||||||
|
if qr.cooldown.auto and qr.selected is qr.replies[0] and parseInt(qr.status.input.value.match /\d+/) < 6
|
||||||
|
qr.cooldown.auto = false
|
||||||
# sync between tabs
|
# sync between tabs
|
||||||
$.sync 'qr.persona', (persona) ->
|
$.sync 'qr.persona', (persona) ->
|
||||||
return unless qr.el.hidden
|
return unless qr.el.hidden
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user