From c788e6e8aef1d47e38860dbd6221d8907044534a Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Fri, 22 Feb 2013 15:44:47 +0100 Subject: [PATCH] Fix QR captcha and new thread redirection. #932 --- 4chan_x.user.js | 4 ++-- src/qr.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index de2f0534b..3bfffc05b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -6056,7 +6056,7 @@ captcha: { init: function() { var _this = this; - if (__indexOf.call(d.cookie, 'pass_enabled=') < 0) { + if (__indexOf.call(d.cookie, 'pass_enabled=') >= 0) { return; } if (!(this.isEnabled = !!$.id('captchaFormPart'))) { @@ -6428,7 +6428,7 @@ }); QR.cooldown.auto = QR.replies.length > 1; if (threadID === '0') { - $.open("/" + g.BOARD + "/res/" + postID); + $.open("//boards.4chan.org//" + g.BOARD + "/res/" + postID); } else if (g.VIEW === 'reply' && !QR.cooldown.auto) { $.open("//boards.4chan.org/" + g.BOARD + "/res/" + threadID + "#p" + postID); } diff --git a/src/qr.coffee b/src/qr.coffee index 065bee66f..a5a3c9644 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -456,7 +456,7 @@ QR = captcha: init: -> - return unless 'pass_enabled=' in d.cookie + return if 'pass_enabled=' in d.cookie return unless @isEnabled = !!$.id 'captchaFormPart' if $.id 'recaptcha_challenge_field_holder' @ready() @@ -798,7 +798,7 @@ QR = QR.cooldown.auto = QR.replies.length > 1 if threadID is '0' # new thread - $.open "/#{g.BOARD}/res/#{postID}" + $.open "//boards.4chan.org/#{g.BOARD}/res/#{postID}" else if g.VIEW is 'reply' and !QR.cooldown.auto # posting from the index $.open "//boards.4chan.org/#{g.BOARD}/res/#{threadID}#p#{postID}"