mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 23:36:37 +08:00
Fixed copy name feature
This commit is contained in:
parent
7f0b6cca9f
commit
1df40aa0df
|
@ -265,27 +265,23 @@
|
|||
Email:
|
||||
<a href="mailto: bartnikjack@gmail.com">bartnikjack@gmail.com</a>
|
||||
</p>
|
||||
<!-- <script>
|
||||
// FIXME: fix copyUserName()
|
||||
function copyUserName() {
|
||||
var text = "Miodec#1512";
|
||||
text.select();
|
||||
text.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
return text;
|
||||
alert("Copied!");
|
||||
}
|
||||
</script> -->
|
||||
|
||||
<p>
|
||||
<!-- TODO: Find better way to implement username copy -->
|
||||
Discord:
|
||||
<!-- <button
|
||||
title="Click me to copy username"
|
||||
id="copyButton"
|
||||
value="Miodec#1512"
|
||||
onclick="copyUserName()"
|
||||
> -->
|
||||
Miodec#1512
|
||||
<!-- </button> -->
|
||||
<input type="text" value="Miodec#1512" id="username" />
|
||||
<button title="Click to copy username" onclick="copyUserName()">
|
||||
Copy
|
||||
</button>
|
||||
<script>
|
||||
function copyUserName() {
|
||||
var text = document.getElementById("username");
|
||||
text.select();
|
||||
text.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
alert("Copied To Clipboard!");
|
||||
}
|
||||
</script>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue