Change tab title to show internal timers
This commit is contained in:
parent
e57f7d392a
commit
4bcdc2f28a
@ -23,6 +23,7 @@ const timer=(message,secondsLeft,cancelable,callback)=>{
|
||||
brws=(typeof browser=="undefined"?chrome:browser),
|
||||
cancel=()=>{
|
||||
clearInterval(tid)
|
||||
titleElm.textContent=title
|
||||
div.classList.add("uk-hidden")
|
||||
},
|
||||
tick=()=>{
|
||||
@ -31,6 +32,7 @@ const timer=(message,secondsLeft,cancelable,callback)=>{
|
||||
cancel()
|
||||
callback()
|
||||
}
|
||||
titleElm.textContent="("+secondsLeft+") "+title
|
||||
if(secondsLeft==1)
|
||||
{
|
||||
p.textContent=brws.i18n.getMessage(message+"Singular")+" "
|
||||
|
@ -1 +1,2 @@
|
||||
document.querySelectorAll("[data-message]").forEach(e=>e.textContent=brws.i18n.getMessage(e.getAttribute("data-message")))
|
||||
document.querySelectorAll("[data-message]").forEach(e=>e.textContent=brws.i18n.getMessage(e.getAttribute("data-message")))
|
||||
const titleElm=document.querySelector("title"),title=titleElm.textContent
|
||||
|
Loading…
x
Reference in New Issue
Block a user