Guest User

Untitled

a guest
Nov 24th, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. function copytext() {
  3.   var copyText = document.getElementById("sharelink");
  4.   copyText.select();
  5.   copyText.setSelectionRange(0, 99999)
  6.   document.execCommand("copy");
  7.   var copiedtext = document.getElementById("copiedtext");
  8.   copiedtext.innerHTML = "Copied!";
  9.   copiedtext.style.opacity = 1;
  10.  
  11.   var fadeEffect = setInterval(function () {
  12.         if (!copiedtext.style.opacity) {
  13.             copiedtext.style.opacity = 1;
  14.         }
  15.         if (copiedtext.style.opacity > 0) {
  16.             copiedtext.style.opacity -= 0.1;
  17.         } else {
  18.             clearInterval(fadeEffect);
  19.         }
  20.     }, 100);
  21. }
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment