made copy-to-clipboard more usefull

This commit is contained in:
2026-01-24 00:10:18 +01:00
parent a8acb84081
commit 791b27d865
2 changed files with 9 additions and 2 deletions
+5 -2
View File
@@ -12,7 +12,7 @@
<tr><td class="white right">Org</td><td class="white left">{{ flower.organization }}</td> </tr>
<tr><td class="white right">You</td><td class="white left">{{ flower.myName }}</td> </tr>
<tr><td class="white right">Login</td><td class="white left">{{ flower.myID }}</td> </tr>
<tr><td class="white right">Hash</td><td class="white left"><div id="secret" value="{{ flower.mySecret }}" onclick="myCopyFunction()">{{ flower.mySecret }}</div></td></tr>
<tr><td class="white right">Hash</td><td id="secrettd" class="white left"><div id="secret" value="{{ flower.mySecret }}" onclick="myCopyFunction()">{{ flower.mySecret }}</div></td></tr>
<tr><td class="white">{{ flower.dateCreated[:10] }}</td><td></td> </tr>
</table>
@@ -35,7 +35,10 @@ function myCopyFunction() {
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.getAttribute("value"));
//alert("Copied the text: "+copyText.getAttribute("value"));
// alert("Copied the text: "+copyText.getAttribute("value"));
$("#secrettd").removeClass("white");
$("#secrettd").addClass("blue");
}
</script>