From ec61bf9d6a5a51dbc8efc252d15160643328887f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 20 Jun 2015 21:55:23 -0700 Subject: [PATCH] Add tooltips showing the keys to toggle an image. --- src/Posting/Captcha.fixes.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index 75f3e47f7..1437b71ad 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -63,7 +63,7 @@ Captcha.fixes = @images = $$ '.rc-imageselect-target > div' for img in @images img.tabIndex = 0 - return + @addTooltips @images if @images.length addLabels: -> imageSelect = $ '.fbc-payload-imageselect' @@ -75,6 +75,12 @@ Captcha.fixes = label.dataset.col = i % 3 label $.add imageSelect, labels + @addTooltips labels + + addTooltips: (nodes) -> + for node, i in nodes + node.title = "#{@imageKeys[i]} or #{@imageKeys[i+9].toUpperCase()}" + return checkForm: (e) -> n = 0