Have you ever felt irritated because you want to select a word from a webpage to search it on google or want to reverse image search an image but you can not copy the text nor you can right-click on the image then you are not alone,
Many websites have done this to stop protect their content from being copied but in the process, this hurts day-to-day users who are not tech-savvy.
Some bank websites also do this to protect their users by blocking right-click and copy-paste on important pages.
In this article
How to Enable Right Click
Most of the time JavaScript is used to prevent users from right-clicking,
these scripts usually look for the ‘contextmenu’ event,
that event gets fired when we right-click on a web page,
Disable JavaScript
Disabling JavaScript is easy,
- Just click on the paddle lock icon next to the domain name,
- Then select site settings
- In site settings now under the permissions group, you can block JavaScript that is set to Allow(default)
Once JavaScript is disabled you can now reload the page to try to right-click anywhere on the page it will work.
Just keep in mind if the website is totally dependent on JavaScript then the website may totally break, in that case, use other solutions.
In this way, you can disable JavaScript on a single page if you want to disable JavaScript for all sites at once. visit
chrome://settings/content/javascript
- Select “Don’t allow sites to use Javascript” to disable JavaScript for all websites
- You can add manually websites to the allowed and not allowed list to apply and disable the javascript selectively.
Use browser Extension or Add-On
One of the easiest way to enable right click is use an browser extension or Add-one.
with this simple solution you can enable right click and copy paste both at the same time, if one browser extension doesn’t work you can use different one.
Browser Extensions are really helpful, here are some of the Best Google Chrome Extensions Handpicked For You that will help you in other things.
Use Bookmarklet
If the website is setting on context menu event to prevent opening a context menu then you can easily run the following bookmarklet to remove it,
If you don’t know about bookmarklets then in simple worlds Bookmarklets are JavaScript code that is saved as Bookmarks and can be run easily by clicking them,
To save the bookmarklets shown below just select the Bookmarklet and drag and drop it to your bookmark bar,
javascript:void(document.oncontextmenu=null)
javascript:void(document.body.setAttribute("oncontextmenu","return true");)
javascript:void(document.body.removeAttribute("oncontextmenu");)
Just drag and drop these js code on your bookmark bar, as shown in the gif
Or create a bookmark and paste the mentioned code in the URL part.
Insert gif here bookmarklet add
After adding the bookmarklet visit the page where copying content is disabled,
Press the bookmarklet
If everything works perfectly, you should be able to copy the content from the site.
If not then do check if the bookmarklet is working properly or not.
To check this open the developer console by pressing F12 and check console if any log is there saying copy-paste is enabled.
Inject JavaScript
If you don’t trust or don’t want to use any third party extension to enable right click you can use the following JavaScript snippet.
You can directly copy and paste the following JS code snippet in console to execute it.
document.oncontextmenu=null
document.body.setAttribute("oncontextmenu","return true")
// to remove attribute set by above code
// document.body.removeAttribute("oncontextmenu")
If you like to use an extension that injects your custom JS code on webpage for you
You can enable it for all sites or specific sites that upto you, you can even make it work on specific page of site.
in URL section you can add URL with wildcard(*) for specific targeting
- www.example.com/* (for targeting all pages of website)
- *.example.com/* (for targeting all pages of website including all subdomains)
- www.example.com/pathto/page (for targeting specific page)
- * (to target all websites)
How to Enable Copy Paste
Websites often block copying content from sites to stop other spamming sites to copy their content.
But that also creates an issue for normal users like us where when we have to just copy a line or paragraph to share with someone or store it somewhere for reference.
Here in this post, I will explain how you can enable copy-pasting on any website that blocks or some other ways to copy content.
then the simplest option is to use a bookmarklet to enable selection or just disable the javascript on-page.
Disabling JavaScript
If the site is using JavaScript to block the copy-paste functionality then you can directly Disable JavaScript on page to enable copy paste.
- Just click on the paddlelock icon next to domain name,
- Then select site settings
- In site settings now under permissions group you can block JavaScript that is set to Allow(default)
Use browser Extension or Add-On
One of the easiest way to enable right click is use an browser extension or Add-one.
with this simple solution you can enable right click and copy paste both at the same time, if one browser extension doesn’t work you can use different one.
Using CSS
If website has disabled selection of text on site then you can simple CSS snippet to enable text selection.
CSS can be injected to page using other extension
* {
-webkit-user-select: unset!important; /* Safari */
-ms-user-select: unset!important; /* IE 10 and IE 11 */
user-select: unset!important; /* Standard syntax */
}
To Inject css into any webpage you can use the following extension