Merge branch 'bstable'
This commit is contained in:
commit
d6f8d1ec2d
@ -15,6 +15,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
|
|||||||
|
|
||||||
### v1.11.16
|
### v1.11.16
|
||||||
|
|
||||||
|
**v1.11.16.9** *(2015-11-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.9/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
- Nope, it's on Google's end. Bringing back scrolling prevention.
|
||||||
|
|
||||||
**v1.11.16.8** *(2015-11-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.crx "Chromium version")]
|
**v1.11.16.8** *(2015-11-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.16.8/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
- Remove obsolete captcha bug workaround that may be causing scrolling to top.
|
- Remove obsolete captcha bug workaround that may be causing scrolling to top.
|
||||||
|
|
||||||
|
|||||||
@ -241,6 +241,9 @@ Captcha.v2 =
|
|||||||
if $ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]', node
|
if $ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]', node
|
||||||
new MutationObserver(@fixBubble.bind(@, node)).observe node,
|
new MutationObserver(@fixBubble.bind(@, node)).observe node,
|
||||||
attributes: true
|
attributes: true
|
||||||
|
# Prevent Recaptcha from keeping focus when popup dismissed.
|
||||||
|
if overlay = $ 'div[style*="position: fixed;"]', node
|
||||||
|
$.on overlay, 'click', -> $('#qr iframe')?.blur()
|
||||||
|
|
||||||
fixBubble: (node) ->
|
fixBubble: (node) ->
|
||||||
{bottom, right, width} = node.getBoundingClientRect()
|
{bottom, right, width} = node.getBoundingClientRect()
|
||||||
|
|||||||
@ -153,12 +153,28 @@ QR =
|
|||||||
unless QR.inBubble()
|
unless QR.inBubble()
|
||||||
QR.hasFocus = d.activeElement and QR.nodes.el.contains(d.activeElement)
|
QR.hasFocus = d.activeElement and QR.nodes.el.contains(d.activeElement)
|
||||||
QR.nodes.el.classList.toggle 'focus', QR.hasFocus
|
QR.nodes.el.classList.toggle 'focus', QR.hasFocus
|
||||||
|
# XXX Stop unwanted scrolling due to captcha.
|
||||||
|
if QR.captcha.isEnabled and QR.captcha is Captcha.v2 and !QR.captcha.noscript
|
||||||
|
if QR.inCaptcha()
|
||||||
|
QR.scrollY = window.scrollY
|
||||||
|
$.on d, 'scroll', QR.scrollLock
|
||||||
|
else
|
||||||
|
$.off d, 'scroll', QR.scrollLock
|
||||||
|
|
||||||
inBubble: ->
|
inBubble: ->
|
||||||
bubbles = $$ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'
|
bubbles = $$ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]'
|
||||||
d.activeElement in bubbles or bubbles.some (el) ->
|
d.activeElement in bubbles or bubbles.some (el) ->
|
||||||
getComputedStyle(el).visibility isnt 'hidden' and el.getBoundingClientRect().bottom > 0
|
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())
|
||||||
|
|
||||||
|
scrollLock: ->
|
||||||
|
if QR.inCaptcha()
|
||||||
|
window.scroll window.scrollX, QR.scrollY
|
||||||
|
else
|
||||||
|
$.off d, 'scroll', QR.scrollLock
|
||||||
|
|
||||||
hide: ->
|
hide: ->
|
||||||
d.activeElement.blur()
|
d.activeElement.blur()
|
||||||
$.addClass QR.nodes.el, 'autohide'
|
$.addClass QR.nodes.el, 'autohide'
|
||||||
|
|||||||
@ -1322,18 +1322,8 @@ input.field.tripped:not(:hover):not(:focus) {
|
|||||||
#qr .captcha-root {
|
#qr .captcha-root {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
#qr .captcha-container > div {
|
#qr .captcha-container > div > div {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 304px;
|
|
||||||
}
|
|
||||||
/* scrollable with scroll bar hidden; prevents scroll on space press */
|
|
||||||
:root.blink #qr .captcha-container > div {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
:root.blink #qr .captcha-container > div > div:first-of-type {
|
|
||||||
overflow-y: scroll;
|
|
||||||
overflow-x: hidden;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
}
|
||||||
#qr .captcha-counter {
|
#qr .captcha-counter {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user