From d063784d73feeb3303fcd575c64df1ca92995c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=95=E5=B1=82=E7=94=A8=E6=88=B7?= Date: Mon, 23 May 2022 20:58:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20=E5=8F=98=E9=87=8F=E5=90=8D=E9=87=8D?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/main.js b/js/main.js index 3adc31a..923c778 100644 --- a/js/main.js +++ b/js/main.js @@ -92,12 +92,12 @@ fetch('https://v1.hitokoto.cn?max_length=24') }) .catch(console.error) -var time = 0; +var times = 0; $('#hitokoto').click(function () { - if (time == 0) { - time = 1; + if (times == 0) { + times = 1; var index = setInterval(function () { - time--; + times--; if (time == 0) { clearInterval(index); }