From b8fac27511029493a4873838f87c0e6f063c216a Mon Sep 17 00:00:00 2001
From: neri
Date: Sun, 4 Apr 2021 14:49:34 +0200
Subject: [PATCH] hide copy buttons when js is not enabled
Fixes #5
---
static/copy.js | 1 +
static/index.css | 5 +++++
template/upload.html | 2 +-
template/view.html | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/static/copy.js b/static/copy.js
index 6604c47..889b8ff 100644
--- a/static/copy.js
+++ b/static/copy.js
@@ -1,4 +1,5 @@
const button = document.getElementById("copy");
+button.classList.remove("hidden");
button.onclick = () => {
if (!navigator.clipboard) {
button.innerText = "nicht unterstützt";
diff --git a/static/index.css b/static/index.css
index 93e41e5..ac3413a 100644
--- a/static/index.css
+++ b/static/index.css
@@ -39,6 +39,7 @@ input,
select,
textarea,
.button {
+ display: inline-block;
background-color: var(--bg);
color: var(--fg);
padding: 0.5rem;
@@ -48,6 +49,10 @@ textarea,
max-width: calc(100vw - 3rem - 4px);
}
+*.hidden {
+ display: none;
+}
+
input[type="checkbox"] {
margin-bottom: 1.5rem;
}
diff --git a/template/upload.html b/template/upload.html
index 4ef9612..f554dd4 100644
--- a/template/upload.html
+++ b/template/upload.html
@@ -13,7 +13,7 @@
datei-link:
{url}
-
+