MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / makeTitle

Function makeTitle

scripts/web_timer.js:499–507  ·  view source on GitHub ↗
(revert)

Source from the content-addressed store, hash-verified

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
510function throttle(mainFunction, delay) {

Callers 1

runFunction · 0.85

Calls 1

secondsToTimeFunction · 0.85

Tested by

no test coverage detected