This site is being remade and I won't be updating this for a while. Expect a lot of broken links, design and functionality. If all goes well, things should be stable by the end of 2022. Thank you for understanding.

HomeJust

Disabling Copy-Paste Now, Really?

Published

I was doing some work and I tried to copy a phone number from a website which is one of the biggest web design mistakes. It gave me this handy error:

Red banner saying content is protected

Protected against fucking what? It’s a corporate website and I was trying to copy a phone number.

No problem, I’d just open the dev tools. Well guess what?

Red banner saying alert you are not allowed to copy content or view source

I wonder what goes through company’s minds when they do this. I hope the web developer to charge extra for this bullshit. Disabling JS didn’t fix it since it was needed to render text on the page. I initially tried to remove the code responsible then I realized that contenteditable would be much easier.

Again, please don’t do this unless you have a very good reason. For instance, I had to use it to make a web application work. Preventing piracy is not a good reason. It’s as bad as thinking that a monkey jpeg that we can all copy-paste is worth something.