From 26dbff458c78463b55565e132f08ae0d918326ba Mon Sep 17 00:00:00 2001 From: liyunze <50455574+liyunze-coding@users.noreply.github.com> Date: Fri, 8 Sep 2023 20:41:10 +0800 Subject: [PATCH] fixed titles --- scripts/taskList.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/taskList.js b/scripts/taskList.js index 9b10105..76bfc2c 100644 --- a/scripts/taskList.js +++ b/scripts/taskList.js @@ -107,17 +107,14 @@ function importStyles() { ); }); + let currentTitle = 0; // interval the task title setInterval(async () => { let taskTitle = document.querySelector(".title"); - let taskTitleText = taskTitle.innerText; // cycle through a list of titles let titles = configs.animation.titles; - // get current title - let currentTitle = titles.indexOf(taskTitleText); - // if current title is the last title, set it to the first title if (currentTitle === titles.length - 1) { currentTitle = 0;