diff --git a/src/General/Config.coffee b/src/General/Config.coffee index f5a4d4609..1014377b1 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -486,7 +486,7 @@ Config = ] 'Use Recaptcha v1': [ false - 'Use the old text version of Recaptcha.' + 'Use the old text version of Recaptcha where possible.' ] 'Use Recaptcha v2 in Reports': [ false diff --git a/src/Posting/Captcha.replace.coffee b/src/Posting/Captcha.replace.coffee index aa645370f..ee11c13a2 100644 --- a/src/Posting/Captcha.replace.coffee +++ b/src/Posting/Captcha.replace.coffee @@ -2,18 +2,20 @@ Captcha.replace = init: -> return unless d.cookie.indexOf('pass_enabled=1') < 0 - if Conf['Force Noscript Captcha'] and Main.jsEnabled - $.ready Captcha.replace.noscript - return - - if location.hostname is 'sys.4chan.org' and Conf['Use Recaptcha v2 in Reports'] and Main.jsEnabled - $.ready Captcha.replace.v2 + if location.hostname is 'sys.4chan.org' and Main.jsEnabled + if Conf['Use Recaptcha v2 in Reports'] + type = if Conf['Force Noscript Captcha'] then 'noscript' else 'v2' + $.ready Captcha.replace[type] return if Conf['Use Recaptcha v1'] and Main.jsEnabled and location.hostname isnt 'www.4chan.org' $.ready Captcha.replace.v1 return + if Conf['Force Noscript Captcha'] and Main.jsEnabled + $.ready Captcha.replace.noscript + return + if Conf['captchaLanguage'].trim() or Conf['Captcha Fixes'] if location.hostname is 'boards.4chan.org' $.onExists doc, '#captchaFormPart', true, (node) -> $.onExists node, 'iframe', true, Captcha.replace.iframe diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 6e79f28b5..a7502aa53 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -29,10 +29,7 @@ QR = return if g.VIEW is 'archive' - version = if Conf['Use Recaptcha v1'] and not Conf['Force Noscript Captcha'] and Main.jsEnabled - 'v1' - else - 'v2' + version = if Conf['Use Recaptcha v1'] and Main.jsEnabled then 'v1' else 'v2' @captcha = Captcha[version] $.on d, '4chanXInitFinished', @initReady