fix: copy button broken
All checks were successful
/ deploy (push) Successful in 38s

This commit is contained in:
ange 2025-04-22 02:15:02 +00:00
parent ea780d3992
commit bc4722dbfd
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
} }
function copyFile(id) { function copyFile(id) {
fetch(document.getElementById(id).childNodes[0].href).then(f => { fetch(document.getElementById(id).childNodes[1].href).then(f => {
f.text().then(t => { f.text().then(t => {
navigator.clipboard.writeText(t); navigator.clipboard.writeText(t);
}) })

View File

@ -18,7 +18,7 @@ var routes = []struct {
{[]string{"GET"}, url(""), index}, {[]string{"GET"}, url(""), index},
{[]string{"GET"}, url("/(pgp.asc|ssh)"), static}, {[]string{"GET"}, url("/(pgp.asc|ssh)"), static},
{[]string{"GET"}, url("/static/.+"), static}, {[]string{"GET"}, url("/static/.+"), static},
{[]string{"GET"}, url("/(.+\\.(css))"), file}, {[]string{"GET"}, url("/(.+\\.css)"), css},
{[]string{"GET"}, url("/([^/]+)"), html}, {[]string{"GET"}, url("/([^/]+)"), html},
} }