add a button to restore the current progress

This commit is contained in:
siutin
2023-02-06 03:55:31 +08:00
parent 9407f1731a
commit 4242e194e4
4 changed files with 80 additions and 8 deletions

View File

@@ -59,8 +59,8 @@ function setTitle(progress){
}
function randomId(){
return "task(" + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7)+")"
function randomId(prefix=null){
return "task(" + (prefix == null ? "" : prefix + "_") + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7)+")"
}
// starts sending progress requests to "/internal/progress" uri, creating progressbar above progressbarContainer element and