Skip to content

Commit f144b81

Browse files
authored
Update renew.user.js
1 parent c171e4a commit f144b81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

renew.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if ((location.pathname.startsWith('/xapanel/xvps/server/freevps/extend/conf') ||
5454
const body = document.querySelector('img[src^="data:"]').src
5555
const code = await fetch('https://captcha-120546510085.asia-northeast1.run.app', { method: 'POST', body }).then(r => r.text())
5656
document.querySelector('[placeholder="上の画像の数字を入力"]').value = code
57-
setInterval(() => {
58-
if (document.querySelector('[name=cf-turnstile-response]').value) unsafeWindow.submit_button.click()
59-
}, 1000)
57+
const cf = document.querySelector('.cf-turnstile [name=cf-turnstile-response]')
58+
if (cf.value) unsafeWindow.submit_button.click()
59+
new MutationObserver(() => unsafeWindow.submit_button.click()).observe(cf, { attributes: true, attributeFilter: ['value'] })
6060
}

0 commit comments

Comments
 (0)