DEV Community

abbazs
abbazs

Posted on

1

How to paste into text fields in websites that block pasting?

Press F12 and paste the following code into the console.

var allowPaste = function(e){
  e.stopImmediatePropagation();
  return true;
};
document.addEventListener('paste', allowPaste, true);
Enter fullscreen mode Exit fullscreen mode

Viola one can now paste into any text filed.
Repeat again if the site again blocks pasting.

Top comments (1)

Collapse
 
aravind2707 profile image
Aravind Srinivas

PS : can also open the console by pressing Ctrl + Shift + J (Windows / Linux) or Cmd+Opt+J (Mac) and paste the above code to enable pasting on websites that block it!

hope it helps :)<3

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay