From fc5581e00d944865cb46bc019db176c82fa2f679 Mon Sep 17 00:00:00 2001 From: HF Date: Fri, 5 Aug 2022 01:29:09 +0200 Subject: [PATCH] remove dead code --- src/client.js | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/client.js b/src/client.js index 472ff24..2e9e8e8 100644 --- a/src/client.js +++ b/src/client.js @@ -154,32 +154,3 @@ document.addEventListener('DOMContentLoaded', () => { setInterval(runGC, 300000); }); - -// on captcha received -window.onCaptcha = async function onCaptcha(token) { - const body = JSON.stringify({ - token, - }); - await fetch('/api/captcha', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body, - credentials: 'include', - }); - - const { - i, j, pixels, - } = window.pixel; - SocketClient.requestPlacePixels(i, j, pixels); - - if (typeof window.hcaptcha !== 'undefined') { - window.hcaptcha.reset(); - const domBody = document.getElementsByTagName('BODY')[0]; - domBody.style.overflowY = null; - domBody.style.overflow = 'hidden'; - } else { - window.grecaptcha.reset(); - } -};