How to Enable Right - Click On Websites.

Leave a Comment
 Many Sites , Espicially Orkut had recently Disabled Right-click on images. SO I started wondering What to do because this was very necesaary for me.Here I'm Showing you both The tricks. To enable Right-click on any website, and To disable Right click On your Own Site.



* TO disable Right-click on Your site:


                                                  Copy And paste The Below JAvascript code on any page In Your site.
Benifits : If its a blog like mine than visitors wont be able to copy content from it , Or save pictures etc.


Codeoncontextmenu="return false;"
For example, say you have code for an image like below…
<img src=”something” />
Change it to…
<img src=”something” oncontextmenu="return false;"/>


To Enable Right-Click On Websites :

Copy And paste the below javascript on the adress-bar of the page where you want to enable right-click.

CODE:
javascript: var items = document.evaluate('//*[@oncontextmenu=\"return false;\"]', document, null, 7 , null); for ( i = 0; i < items.snapshotLength; i++){items.snapshotItem(i).removeAttribute('oncontextmenu');};void(0);


       Comments Are Most Welcome. Afterall It's Our right to right-click. :)










Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment

A Feedback Costs Nothing Friends.

Powered by Blogger.