disable right clicks with JAVA script
-
I want to disable viewers from right clicking on image to copy them.
right after HEADER
<script language=JavaScript> var message=”Function Disabled!”; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function(“alert(message);return false”) </script>
i don’t want anyone to copy my images.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
Unfortunately posting Javascript is not allowed on WordPress.com for security reasons. Here’s a list of code that is allowed:
As for copying images, even if readers weren’t able to right click they could easily just take a screenshot of them. Unfortunately this is an issue that anyone can face with a public blog. Therefore, to prevent this you can set your site to private, and just invite certain people to view your blog via email. This way you can control who views your site.
Nevertheless, it’s against the law in the United States and in many other countries to reproduce text or images created by someone else without their permission, even if you provide a citation. If you find any of your work copied on a WordPress.com site, please contact us right away through here:
http://automattic.com/dmca-notice/
As a pre-caution I highly recommend adding a watermark to all your images.
Let me know if you have any questions with this!
- The topic ‘disable right clicks with JAVA script’ is closed to new replies.