Skip to content
Snippets Groups Projects
Commit f0f28c4f authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed a minor issue

parent 61f35c14
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
</div> </div>
<div class="url"> <div class="url">
<input type="text" value="https://i.k8r.eu/{{.Image.Id}}"> <input id="url-field" type="text" value="https://i.k8r.eu/{{.Image.Id}}">
<button id="copy-url">Copy</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -75,6 +76,13 @@ ...@@ -75,6 +76,13 @@
fakeDescription.addEventListener("input", fakeDescriptionListener); fakeDescription.addEventListener("input", fakeDescriptionListener);
fakeDescription.addEventListener("keypress", fakeDescriptionListener); fakeDescription.addEventListener("keypress", fakeDescriptionListener);
const urlCopyButton = document.getElementById("copy-url");
const urlField = document.getElementById("url-field");
urlCopyButton.addEventListener("click", () => {
urlField.select();
document.execCommand("Copy");
})
</script> </script>
{{end}} {{end}}
{{end}} {{end}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment