Add CSS class to QR to distinguish v1 from v2 captcha.
This commit is contained in:
parent
ab931069e1
commit
96b8df852a
@ -29,7 +29,7 @@ Captcha.v1 =
|
||||
$.on input, 'keydown', QR.captcha.keydown.bind QR.captcha
|
||||
$.on @nodes.img.parentNode, 'click', QR.captcha.reload.bind QR.captcha
|
||||
|
||||
$.addClass QR.nodes.el, 'has-captcha'
|
||||
$.addClass QR.nodes.el, 'has-captcha', 'captcha-v1'
|
||||
$.after QR.nodes.com.parentNode, [imgContainer, input]
|
||||
|
||||
@captchas = []
|
||||
|
||||
@ -22,7 +22,7 @@ Captcha.v2 =
|
||||
counter = $ '.captcha-counter > a', root
|
||||
@nodes = {root, counter}
|
||||
@count()
|
||||
$.addClass QR.nodes.el, 'has-captcha'
|
||||
$.addClass QR.nodes.el, 'has-captcha', 'captcha-v2'
|
||||
$.after QR.nodes.com.parentNode, root
|
||||
|
||||
$.on counter, 'click', @toggle.bind @
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user