DEV Community

How to customize right click with javascript?

Tawhid on February 01, 2022

Have you used web apps that doesn't show default browser thingy when you right click,rather a custom pop up or menu where you clicked? well you c...
Collapse
 
jonrandy profile image
Jon Randy 🎖️

There are very few situations in which this is a good idea. Removing access to the standard context menus in a web browser will mostly only serve to irritate the user

Collapse
 
dumboprogrammer profile image
Tawhid

yea,although in some cases it is amazing
like in discord for example

Collapse
 
theawesomeguy47 profile image
TheAwesomeGuy47

Can't answer the question, but just a helpful guide.

Use code blocks rather than making a single line of code. Use them with three of ` together. I believe you can put a language next to it like this:

dev-to-uploads.s3.amazonaws.com/up...

Also with long pieces of code you can put it in a place like GitHub Gists, Paste in/Hastebin or other sites.

Thanks!