From 1b14915c435e0d415cdb59e69589c84deebb4d29 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 24 Apr 2011 15:32:56 -0700 Subject: [PATCH] eval only if not op --- 4chan_x.js | 5 +++-- script.coffee | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 05f972056..0c1a16852 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1171,15 +1171,16 @@ $.bind(recaptcha, 'keydown', Recaptcha.listener); return; } - $.globalEval(qr.eval.messageIframe); c = $('b').lastChild; if (c.nodeType === 8) { _ref = c.textContent.match(/thread:(\d+),no:(\d+)/), _ = _ref[0], thread = _ref[1], id = _ref[2]; if (thread === '0') { _ref2 = $('meta', d).content.match(/4chan.org\/(\w+)\//), _ = _ref2[0], board = _ref2[1]; - return window.location = "http://boards.4chan.org/" + board + "/res/" + id + "#watch"; + window.location = "http://boards.4chan.org/" + board + "/res/" + id + "#watch"; + return; } } + return $.globalEval(qr.eval.messageIframe); } }; threadHiding = { diff --git a/script.coffee b/script.coffee index fe5a4a0be..6eac5734f 100644 --- a/script.coffee +++ b/script.coffee @@ -901,14 +901,15 @@ qr = $.bind recaptcha, 'keydown', Recaptcha.listener return - $.globalEval qr.eval.messageIframe - c = $('b').lastChild if c.nodeType is 8 #comment node [_, thread, id] = c.textContent.match(/thread:(\d+),no:(\d+)/) if thread is '0' [_, board] = $('meta', d).content.match(/4chan.org\/(\w+)\//) window.location = "http://boards.4chan.org/#{board}/res/#{id}#watch" + return + + $.globalEval qr.eval.messageIframe threadHiding = init: ->