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
+4
View File
@@ -25,3 +25,7 @@ td.left {
td.right {
text-align: right;
}
td.blue {
color: #208dd6;
}
+4 -1
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>
@@ -36,6 +36,9 @@ function myCopyFunction() {
navigator.clipboard.writeText(copyText.getAttribute("value"));
// alert("Copied the text: "+copyText.getAttribute("value"));
$("#secrettd").removeClass("white");
$("#secrettd").addClass("blue");
}
</script>