modified taskList.js

This commit is contained in:
liyunze
2023-09-06 19:24:00 +08:00
parent 4970b52d13
commit e3ec9ea774
+1 -4
View File
@@ -541,17 +541,14 @@ function hexToRgb(hex) {
return `${r}, ${g}, ${b}`;
}
let currentTitle = 0;
// interval the task title
setInterval(async () => {
let taskTitle = document.getElementById("title");
let taskTitleText = taskTitle.innerText;
// cycle through a list of titles
const titles = configs.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;