Remove captcha destruction on Esc keybind, and restoration on QR unhide.
This commit is contained in:
parent
add0f3d3a2
commit
692e3d4dd3
@ -47,7 +47,6 @@ Keybinds =
|
|||||||
$('.close', notification).click()
|
$('.close', notification).click()
|
||||||
else if QR.nodes and !QR.nodes.el.hidden
|
else if QR.nodes and !QR.nodes.el.hidden
|
||||||
if Conf['Persistent QR']
|
if Conf['Persistent QR']
|
||||||
QR.captcha.destroy()
|
|
||||||
QR.hide()
|
QR.hide()
|
||||||
else
|
else
|
||||||
QR.close()
|
QR.close()
|
||||||
|
|||||||
@ -137,11 +137,7 @@ QR =
|
|||||||
QR.nodes.el.contains(d.activeElement) or
|
QR.nodes.el.contains(d.activeElement) or
|
||||||
d.activeElement.nodeName is 'IFRAME' and /^https:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src)
|
d.activeElement.nodeName is 'IFRAME' and /^https:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src)
|
||||||
)
|
)
|
||||||
if focus
|
$[if focus then 'addClass' else 'rmClass'] QR.nodes.el, 'focus'
|
||||||
QR.captcha.setup() if $.hasClass(QR.nodes.el, 'autohide') and !$.hasClass(QR.nodes.el, 'focus')
|
|
||||||
$.addClass QR.nodes.el, 'focus'
|
|
||||||
else
|
|
||||||
$.rmClass QR.nodes.el, 'focus'
|
|
||||||
if chrome?
|
if chrome?
|
||||||
# XXX Stop anomalous scrolling on space/tab in captcha iframe.
|
# XXX Stop anomalous scrolling on space/tab in captcha iframe.
|
||||||
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
||||||
@ -160,7 +156,6 @@ QR =
|
|||||||
$.addClass QR.nodes.el, 'autohide'
|
$.addClass QR.nodes.el, 'autohide'
|
||||||
QR.nodes.autohide.checked = true
|
QR.nodes.autohide.checked = true
|
||||||
unhide: ->
|
unhide: ->
|
||||||
QR.captcha.setup() if $.hasClass(QR.nodes.el, 'autohide') and !$.hasClass(QR.nodes.el, 'focus')
|
|
||||||
$.rmClass QR.nodes.el, 'autohide'
|
$.rmClass QR.nodes.el, 'autohide'
|
||||||
QR.nodes.autohide.checked = false
|
QR.nodes.autohide.checked = false
|
||||||
toggleHide: ->
|
toggleHide: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user