Merge branch 'bstable'

This commit is contained in:
ccd0 2015-10-30 12:16:41 -07:00
commit ef4491b0c2
3 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.13
**v1.11.13.12** *(2015-10-30)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.13.12/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.13.12/builds/4chan-X-noupdate.crx "Chromium version")]
- Update for captcha changes.
**v1.11.13.11** *(2015-10-30)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.13.11/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.13.11/builds/4chan-X-noupdate.crx "Chromium version")]
- Work around captcha bug causing captcha to go offscreen to the right.

View File

@ -241,6 +241,7 @@ Captcha.v2 =
fixBubble: (node) ->
{bottom, right, width} = node.getBoundingClientRect()
if (
getComputedStyle(node).visibility isnt 'hidden' and
bottom > 0 and # not deliberately offscreen
right > doc.clientWidth # offscreen to right
)

View File

@ -163,7 +163,8 @@ QR =
inBubble: ->
bubbles = $$ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'
d.activeElement in bubbles or bubbles.some((el) -> el.getBoundingClientRect().bottom > 0)
d.activeElement in bubbles or bubbles.some (el) ->
getComputedStyle(el).visibility isnt 'hidden' and el.getBoundingClientRect().bottom > 0
inCaptcha: ->
(d.activeElement?.nodeName is 'IFRAME' and QR.nodes.el.contains(d.activeElement)) or (QR.hasFocus and QR.inBubble())