generated at
プレゼンタイマー

style.css
.timer { left: 0; bottom: 0; position: fixed; padding: 16px; background-color: #ffcaca; font-size: 32px; font-weight: 800; margin-right: auto; margin-left: auto; z-index: 201; }

script.js
let timerId = null; let time = 0; // from https://stackoverflow.com/questions/6312993/javascript-seconds-to-time-string-with-format-hhmmss const toHHMMSS = function (sec_num) { var hours = Math.floor(sec_num / 3600); var minutes = Math.floor((sec_num - (hours * 3600)) / 60); var seconds = sec_num - (hours * 3600) - (minutes * 60); if (hours < 10) {hours = "0"+hours;} if (minutes < 10) {minutes = "0"+minutes;} if (seconds < 10) {seconds = "0"+seconds;} return hours+':'+minutes+':'+seconds; } const pButton = Array.from(document.querySelectorAll(".dropdown-menu a")).filter(e => e.textContent.match(/Start presentation/))[0]; pButton.addEventListener('click', e => { const timerDOM = document.createElement('div'); timerDOM.className = 'timer'; document.body.appendChild(timerDOM); setInterval(e => { time += 1; timerDOM.textContent = toHHMMSS(time); }, 1000); })