- 1 min

How to copy text from a blocked site using JavaScript

Let's get straight to the point!

Code

var allowPaste = function(e){
  e.stopImmediatePropagation();
  return true;
};
document.addEventListener('copy', allowPaste, true);
document.addEventListener('paste', allowPaste, true);
Topaz

Topaz

Always keep learning.

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium vimeo