Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function copytext() {
- var copyText = document.getElementById("sharelink");
- copyText.select();
- copyText.setSelectionRange(0, 99999)
- document.execCommand("copy");
- var copiedtext = document.getElementById("copiedtext");
- copiedtext.innerHTML = "Copied!";
- copiedtext.style.opacity = 1;
- var fadeEffect = setInterval(function () {
- if (!copiedtext.style.opacity) {
- copiedtext.style.opacity = 1;
- }
- if (copiedtext.style.opacity > 0) {
- copiedtext.style.opacity -= 0.1;
- } else {
- clearInterval(fadeEffect);
- }
- }, 100);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment