Auto-noko on thread creation.

This commit is contained in:
Nicolas Stepien 2012-01-26 03:53:03 +01:00
parent fe5e0a08d4
commit 76cb2b4f9a
2 changed files with 6 additions and 3 deletions

View File

@ -1723,7 +1723,9 @@
};
$.set('qr.persona', persona);
_ref = b.lastChild.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], postNumber = _ref[2];
if (thread === 0) {} else {
if (thread === '0') {
window.open("/" + g.BOARD + "/res/" + postNumber, '_self');
} else {
qr.cooldown.auto = qr.replies.length > 1;
qr.cooldown.set(/sage/i.test(reply.email) ? 60 : 30);
}

View File

@ -1299,8 +1299,9 @@ qr =
$.set 'qr.persona', persona
[_, thread, postNumber] = b.lastChild.textContent.match /thread:(\d+),no:(\d+)/
if thread is 0 # new thread
# auto noko to postNumber
if thread is '0' # new thread
# auto-noko
window.open "/#{g.BOARD}/res/#{postNumber}", '_self'
else
# Enable auto-posting if we have stuff to post, disable it otherwise.
qr.cooldown.auto = qr.replies.length > 1