Update captcha cleanup.
This commit is contained in:
parent
f8b313ecb4
commit
1d5a144cb2
@ -154,9 +154,11 @@ Captcha.v2 =
|
|||||||
$.rm @nodes.container if @nodes.container
|
$.rm @nodes.container if @nodes.container
|
||||||
delete @nodes.container
|
delete @nodes.container
|
||||||
# Clean up abandoned iframes.
|
# Clean up abandoned iframes.
|
||||||
for garbage in $$ 'div > .gc-bubbleDefault'
|
garbage = $.X '//iframe[starts-with(@src, "https://www.google.com/recaptcha/api2/frame")]/ancestor-or-self::*[parent::body]'
|
||||||
$.rm ins if (ins = garbage.parentNode.nextSibling) and ins.nodeName is 'INS'
|
i = 0
|
||||||
$.rm garbage.parentNode
|
while node = garbage.snapshotItem i++
|
||||||
|
$.rm ins if (ins = node.nextSibling)?.nodeName is 'INS'
|
||||||
|
$.rm node
|
||||||
return
|
return
|
||||||
|
|
||||||
sync: (captchas=[]) ->
|
sync: (captchas=[]) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user