mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-10 21:53:13 +08:00
added copyUserName error handling logic
This commit is contained in:
parent
d310ebe87e
commit
ccd768c85d
1 changed files with 11 additions and 2 deletions
|
@ -57,9 +57,18 @@
|
|||
</style>
|
||||
<script defer>
|
||||
function copyUserName() {
|
||||
navigator.clipboard.writeText("Miodec#1512");
|
||||
// alert("Copied To Clipboard!");
|
||||
if (true) {
|
||||
navigator.clipboard.writeText("Miodec#1512");
|
||||
// alert("Copied To Clipboard!");
|
||||
console.log("Username copied");
|
||||
}
|
||||
else {
|
||||
alert("Unable to copy username");
|
||||
console.log("Failed to copy username")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
|
Loading…
Reference in a new issue