Fix QR captcha and new thread redirection. #932

This commit is contained in:
Nicolas Stepien 2013-02-22 15:44:47 +01:00
parent 53d4f5d71d
commit c788e6e8ae
2 changed files with 4 additions and 4 deletions

View File

@ -6056,7 +6056,7 @@
captcha: { captcha: {
init: function() { init: function() {
var _this = this; var _this = this;
if (__indexOf.call(d.cookie, 'pass_enabled=') < 0) { if (__indexOf.call(d.cookie, 'pass_enabled=') >= 0) {
return; return;
} }
if (!(this.isEnabled = !!$.id('captchaFormPart'))) { if (!(this.isEnabled = !!$.id('captchaFormPart'))) {
@ -6428,7 +6428,7 @@
}); });
QR.cooldown.auto = QR.replies.length > 1; QR.cooldown.auto = QR.replies.length > 1;
if (threadID === '0') { if (threadID === '0') {
$.open("/" + g.BOARD + "/res/" + postID); $.open("//boards.4chan.org//" + g.BOARD + "/res/" + postID);
} else if (g.VIEW === 'reply' && !QR.cooldown.auto) { } else if (g.VIEW === 'reply' && !QR.cooldown.auto) {
$.open("//boards.4chan.org/" + g.BOARD + "/res/" + threadID + "#p" + postID); $.open("//boards.4chan.org/" + g.BOARD + "/res/" + threadID + "#p" + postID);
} }

View File

@ -456,7 +456,7 @@ QR =
captcha: captcha:
init: -> init: ->
return unless 'pass_enabled=' in d.cookie return if 'pass_enabled=' in d.cookie
return unless @isEnabled = !!$.id 'captchaFormPart' return unless @isEnabled = !!$.id 'captchaFormPart'
if $.id 'recaptcha_challenge_field_holder' if $.id 'recaptcha_challenge_field_holder'
@ready() @ready()
@ -798,7 +798,7 @@ QR =
QR.cooldown.auto = QR.replies.length > 1 QR.cooldown.auto = QR.replies.length > 1
if threadID is '0' # new thread 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 else if g.VIEW is 'reply' and !QR.cooldown.auto # posting from the index
$.open "//boards.4chan.org/#{g.BOARD}/res/#{threadID}#p#{postID}" $.open "//boards.4chan.org/#{g.BOARD}/res/#{threadID}#p#{postID}"