From ea780d39928091224d92692b9f62c8cb4e4e5263 Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 19 Apr 2025 08:50:37 +0000 Subject: [PATCH] fix: copy button --- html/contact.html | 2 +- src/route.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/contact.html b/html/contact.html index 29254f2..3de4dd7 100644 --- a/html/contact.html +++ b/html/contact.html @@ -10,7 +10,7 @@ } 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 => { navigator.clipboard.writeText(t); }) diff --git a/src/route.go b/src/route.go index 19ce2c3..664e7af 100644 --- a/src/route.go +++ b/src/route.go @@ -18,7 +18,7 @@ var routes = []struct { {[]string{"GET"}, url(""), index}, {[]string{"GET"}, url("/(pgp.asc|ssh)"), static}, {[]string{"GET"}, url("/static/.+"), static}, - {[]string{"GET"}, url("/(.+\\.css)"), css}, + {[]string{"GET"}, url("/(.+\\.(css))"), file}, {[]string{"GET"}, url("/([^/]+)"), html}, }