fix: copy button

This commit is contained in:
ange 2025-04-19 08:50:37 +00:00
parent 9420df0a4c
commit ea780d3992
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[1].href).then(f => { fetch(document.getElementById(id).childNodes[0].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)"), css}, {[]string{"GET"}, url("/(.+\\.(css))"), file},
{[]string{"GET"}, url("/([^/]+)"), html}, {[]string{"GET"}, url("/([^/]+)"), html},
} }