Fix 变量名重复

This commit is contained in:
底层用户 2022-05-23 20:58:51 +08:00
parent 5f79695cef
commit d063784d73

View File

@ -92,12 +92,12 @@ fetch('https://v1.hitokoto.cn?max_length=24')
}) })
.catch(console.error) .catch(console.error)
var time = 0; var times = 0;
$('#hitokoto').click(function () { $('#hitokoto').click(function () {
if (time == 0) { if (times == 0) {
time = 1; times = 1;
var index = setInterval(function () { var index = setInterval(function () {
time--; times--;
if (time == 0) { if (time == 0) {
clearInterval(index); clearInterval(index);
} }