Add feedback page links to image captcha error messages.

This commit is contained in:
ccd0 2015-10-03 13:15:56 -07:00
parent c1fcb35225
commit 8f0598ba28

View File

@ -68,6 +68,17 @@ Captcha.fixes =
for img in @images
img.tabIndex = 0
@addTooltips @images if @images.length is 9
@complaintLinks()
complaintLinks: ->
for errmsg in $$ '.rc-imageselect-incorrect-response, .rc-imageselect-error-select-one, .rc-imageselect-error-select-more'
unless $ 'a', errmsg
link = $.el 'a',
href: 'https://www.4chan.org/feedback'
target: '_blank'
textContent: '[complain]'
$.add errmsg, [$.tn(' '), link]
return
addLabels: ->
imageSelect = $ '.fbc-payload-imageselect'