Skip to content

Commit

Permalink
fix: update challenge reset
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Nov 2, 2021
1 parent 105bf0b commit 3d0fb37
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/content/reset.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(function () {
const reset = function (challengeUrl) {
for (const [k, client] of Object.entries(___grecaptcha_cfg.clients)) {
for (const [id, client] of Object.entries(___grecaptcha_cfg.clients)) {
for (const [_, items] of Object.entries(client)) {
for (const [_, v] of Object.entries(items)) {
if (v instanceof Element && v.src === challengeUrl) {
(grecaptcha.reset || grecaptcha.enterprise.reset)(k);
return;
if (items instanceof Object) {
for (const [_, v] of Object.entries(items)) {
if (v instanceof Element && v.src === challengeUrl) {
(grecaptcha.reset || grecaptcha.enterprise.reset)(id);
return;
}
}
}
}
Expand Down

0 comments on commit 3d0fb37

Please sign in to comment.