From 76cb2b4f9a352d7c7fe640e271384b0a90945736 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 26 Jan 2012 03:53:03 +0100 Subject: [PATCH] Auto-noko on thread creation. --- 4chan_x.user.js | 4 +++- script.coffee | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 028c8822b..8b4e35663 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -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); } diff --git a/script.coffee b/script.coffee index fab45e68b..7fe68788e 100644 --- a/script.coffee +++ b/script.coffee @@ -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