Skip to content

Commit

Permalink
made clipboard copy alert show coppied text
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRedacted committed Aug 27, 2024
1 parent 06f6302 commit 560e3fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Socials.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<body>
<div id="header">
<div id="name">
<p style="font-size:18pt;"><b>Daniel</b> <b class="redacted" onclick="copyToClipboard('██████')"> Redacted</b></p>
<p style="font-size:18pt;"><b>Daniel</b> <b class="redacted" onclick="copyToClipboard('████')"> Redacted</b></p>
<p style="font-size:12pt;">@DanielRedacted</p>
</div>
<span style="flex:1;"></span>
Expand Down Expand Up @@ -424,7 +424,7 @@ <h3>Website</h3>
function copyToClipboard(text) {
// Use the Clipboard API to copy the text
navigator.clipboard.writeText(text).then(function() {
alert("Text copied to clipboard!");
alert(`"`+ text + `"` + " copied to clipboard!");
}).catch(function(error) {
alert("Failed to copy text: " + error);
});
Expand Down

0 comments on commit 560e3fa

Please sign in to comment.