Add 'Captcha Fixes' option to turn script in captcha on/off.

This commit is contained in:
ccd0 2015-04-18 00:36:55 -07:00
parent 8bea005b3f
commit bb91393b36
2 changed files with 11 additions and 6 deletions

View File

@ -478,6 +478,10 @@ Config =
'Places a link on the bottom of threads to open the QR.'
1
]
'Captcha Fixes': [
true
'Make captcha more keyboard-navigable.'
]
'Quote Links':
'Quote Backlinks': [

View File

@ -1,12 +1,13 @@
Main =
init: ->
if location.hostname is 'www.google.com'
return $.ready ->
doc = d.documentElement
if location.pathname is '/recaptcha/api/fallback'
Captcha.noscript.initFrame()
else
Captcha.fixes.init()
if location.pathname is '/recaptcha/api/fallback'
$.ready -> Captcha.noscript.initFrame()
else
$.get 'Captcha Fixes', true, ({'Captcha Fixes': enabled}) ->
if enabled
$.ready -> Captcha.fixes.init()
return
g.threads = new SimpleDict()
g.posts = new SimpleDict()