From 60721397149791550c3f91565ea799087cebac17 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 20 Feb 2017 21:21:45 -0800 Subject: [PATCH] Add `Use Recaptcha v1 on Index` option. --- src/Posting/Captcha.replace.coffee | 2 +- src/Posting/QR.coffee | 2 +- src/config/Config.coffee | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Posting/Captcha.replace.coffee b/src/Posting/Captcha.replace.coffee index d5aa5a6fa..ae712426e 100644 --- a/src/Posting/Captcha.replace.coffee +++ b/src/Posting/Captcha.replace.coffee @@ -9,7 +9,7 @@ Captcha.replace = return if ( - (Conf['Use Recaptcha v1'] and location.hostname is 'boards.4chan.org') or + (Conf[if g.VIEW is 'thread' then 'Use Recaptcha v1' else 'Use Recaptcha v1 on Index'] and location.hostname is 'boards.4chan.org') or (Conf['Use Recaptcha v1 in Reports'] and location.hostname is 'sys.4chan.org') ) and Main.jsEnabled $.ready Captcha.replace.v1 diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 062d044c2..c02bd2fca 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -28,7 +28,7 @@ QR = return if g.VIEW is 'archive' - version = if Conf['Use Recaptcha v1'] and Main.jsEnabled then 'v1' else 'v2' + version = if Conf[if g.VIEW is 'thread' then 'Use Recaptcha v1' else 'Use Recaptcha v1 on Index'] and Main.jsEnabled then 'v1' else 'v2' @captcha = Captcha[version] $.on d, '4chanXInitFinished', -> BoardConfig.ready QR.initReady diff --git a/src/config/Config.coffee b/src/config/Config.coffee index ed7b09980..36010638a 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -495,7 +495,11 @@ Config = ] 'Use Recaptcha v1': [ false - 'Use the old text version of Recaptcha in the post form.' + 'Use the old text version of Recaptcha in the post form in threads.' + ] + 'Use Recaptcha v1 on Index': [ + false + 'Use the old text version of Recaptcha on the index and catalog. Warning: May interfere with starting threads.' ] 'Use Recaptcha v1 in Reports': [ false