From 539b4bc6364307e1decb4a13b77c9962a92701cf Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 20 Nov 2015 23:09:46 -0800 Subject: [PATCH] Add indication that noscript iframe has focus. --- src/Posting/Captcha.fixes.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index 13bc0ef36..033f5e2c0 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -36,6 +36,9 @@ Captcha.fixes = .fbc-button-verify input:focus { box-shadow: inset 0 0 0 2px #0063d6; } + body.focus .fbc { + box-shadow: inset 0 0 0 2px #4a90e2; + } ''' init: -> @@ -63,6 +66,8 @@ Captcha.fixes = @noscript = true data = if (token = $('.fbc-verification-token > textarea')?.value) then {token} else {working: true} new Connection(window.parent, '*').send data + d.body.classList.toggle 'focus', d.hasFocus() + $.on window, 'focus blur', -> d.body.classList.toggle 'focus', d.hasFocus() @images = $$ '.fbc-payload-imageselect > input' return unless @images.length is 9