JAVASCRIPT   62
copiedtext
Guest on 5th July 2022 07:26:08 AM


  1. bBool=false
  2. var copiedtext=""
  3. var tempstore=""
  4. function initiatecopy() {
  5. bBool=true;
  6. }
  7. function copyit() {
  8. if (bBool) {
  9. tempstore=copiedtext
  10. document.execCommand("Copy")
  11. copiedtext=window.clipboardData.getData("Text");
  12. if (tempstore!=copiedtext) {
  13. alert(copiedtext);
  14. }
  15. bBool=false;
  16. }
  17. }
  18. document.onselectionchange = initiatecopy
  19. document.onmouseup = copyit

Raw Paste

Login or Register to edit or fork this paste. It's free.