(revert)
| 497 | } |
| 498 | |
| 499 | function makeTitle(revert) { |
| 500 | let time = secondsToTime(currentTimerValue) + " " + invisible; |
| 501 | let curTitle = document.title; |
| 502 | if (curTitle.includes(invisible)) { |
| 503 | curTitle = curTitle.split(invisible)[1]; |
| 504 | } |
| 505 | let newTitle = revert ? curTitle : time + curTitle; |
| 506 | document.title = newTitle; |
| 507 | } |
| 508 | } |
| 509 | // https://dev.to/jeetvora331/throttling-in-javascript-easiest-explanation-1081 |
| 510 | function throttle(mainFunction, delay) { |