From 8f0598ba2817d7d0e7ff85f9139ca815860cc384 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 3 Oct 2015 13:15:56 -0700 Subject: [PATCH] Add feedback page links to image captcha error messages. --- src/Posting/Captcha.fixes.coffee | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index e066cdabe..583403a29 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -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'