diff --git a/main.go b/main.go index a5dda15..336aa88 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,8 @@ import ( "strings" ) +const VERSION = "v1" + var ( flagVerbose bool flagWsURL string @@ -70,7 +72,11 @@ func pageIndex(w http.ResponseWriter, r *http.Request) { // {{{ return } - tmpl.Execute(w, sites) + data := map[string]any{ + "Sites": sites, + "VERSION": VERSION, + } + tmpl.Execute(w, data) } // }}} func pageCSS(w http.ResponseWriter, r *http.Request) { // {{{ w.Header().Add("Content-Type", "text/css") diff --git a/static/css/main.css b/static/css/main.css index 5462b71..2b0e032 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -3,6 +3,12 @@ body { margin: 32px; } +#version { + position: absolute; + right: 16px; + top: 16px; +} + input { font-size: 1em; } diff --git a/static/html/index.html b/static/html/index.html index 455fc8f..030ff24 100644 --- a/static/html/index.html +++ b/static/html/index.html @@ -44,8 +44,9 @@ for (const uuid of Object.keys(json.Sites)) { const site = json.Sites[uuid] if (site.StopLoop) { - document.querySelector(`.url[data-uuid="${uuid}"]`)?.classList.add('dead') - document.querySelector(`.watch[data-uuid="${uuid}"]`)?.classList.add('dead') + const els = document.querySelectorAll(`[data-uuid="${uuid}"]`) + for (const el of els) + el.remove() } } }) @@ -64,6 +65,7 @@
+