From bc4722dbfd05390880842cb46105188b7d80ff31 Mon Sep 17 00:00:00 2001 From: ange Date: Tue, 22 Apr 2025 02:15:02 +0000 Subject: [PATCH] fix: copy button broken --- 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 3de4dd7..29254f2 100644 --- a/html/contact.html +++ b/html/contact.html @@ -10,7 +10,7 @@ } 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 => { navigator.clipboard.writeText(t); }) diff --git a/src/route.go b/src/route.go index 664e7af..19ce2c3 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))"), file}, + {[]string{"GET"}, url("/(.+\\.css)"), css}, {[]string{"GET"}, url("/([^/]+)"), html}, }