feat: html static templates

This commit is contained in:
ange 2024-12-14 08:34:47 +00:00
parent 9d0da00371
commit e9fc659a5a
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
12 changed files with 91 additions and 100 deletions

13
static/copy.js Normal file
View file

@ -0,0 +1,13 @@
function copyElem(id, r='') {
navigator.clipboard.writeText(
document.getElementById(id).innerText.replaceAll(r, ''),
);
}
function copyFile(id) {
fetch(document.getElementById(id).childNodes[0].href).then(f => {
f.text().then(t => {
navigator.clipboard.writeText(t);
})
})
}