Skip to content

Instantly share code, notes, and snippets.

View nikhil-thakkar's full-sized avatar
🎯
Focusing

nikhi1 nikhil-thakkar

🎯
Focusing
View GitHub Profile
@nikhil-thakkar
nikhil-thakkar / force-ctrl-c-v.md
Created July 12, 2022 17:23 — forked from Gustavo-Kuze/force-ctrl-c-v.md
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})();