Skip to content

Instantly share code, notes, and snippets.

View Jxnatan7's full-sized avatar

Jonatan Gabriel Jxnatan7

View GitHub Profile
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active December 7, 2024 18:05
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);
})();