Advertise Here

Author Topic: Disable right clicking on website  (Read 4890 times)

0 Members and 1 Guest are viewing this topic.

Offline hackerscorner

  • SMF For Free Newbie
  • *
  • Posts: 9
    • View Profile

  • Total Badges: 5
    Badges: (View All)
    Topic Starter Level 1 First Post Second year Anniversary One year Anniversary
Disable right clicking on website
« on: January 31, 2010, 09:02:06 am »
this code that i made awhile back will stop people right clicking on your website and stealing things :D very handy to some people.
Code: [Select]
<script language="JavaScript">
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Please don't steal my stuff!!!");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</script>




Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: Disable right clicking on website
« Reply #1 on: January 31, 2010, 02:31:13 pm »
This was discussed alot on Revolution X. This script is pointless if javascript is disabled.

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Disable right clicking on website
« Reply #2 on: January 31, 2010, 04:18:08 pm »
Andrew is correct plus:
There is no way to completely stop anyone from taking information from your site.   
If you do use this code keep in mind by using it or any code that disables right mouse clicking you disable it everywhere on your forum INCLUDING in your admin panel and it will get pretty darn annoying after awhile not being able to use it.      They can still use Ctrl-C and their browsers are still going to download all files and images to their temp internet folders on their computers so disabling right mouse click isnt going to do you that much good.

 

Related Topics

  Subject / Started by Replies Last post
18 Replies
7891 Views
Last post November 03, 2006, 02:11:17 pm
by Sassy
22 Replies
8568 Views
Last post January 01, 2010, 03:16:32 pm
by forums4reptiles
1 Replies
1070 Views
Last post August 02, 2007, 10:37:40 am
by LaundryLady
5 Replies
2375 Views
Last post January 10, 2009, 10:57:33 pm
by Corrupted Games
2 Replies
1076 Views
Last post July 06, 2011, 12:47:55 am
by Kiwigold