TechGear007 Forum: Disable Right Click With 2 Twists - TechGear007 Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Disable Right Click With 2 Twists Rate Topic: -----

#1 User is offline   CharmedOne 

  • General Poster
  • Group: Members
  • Posts: 130
  • Joined: 06-December 08
  • Gender:Female
  • Location:USA

Posted 24 July 2010 - 10:16 PM

This is to be added in the <Body> section of your webpage. Someone right clicks on your webpage they are givin annoying alert messages on the last alert the webpage auto closes.


<script type="text/javascript">
<!--
var closeWin="1"; // Do you want to close window (1 for yes 0 for no)
var alertVis="1"; // Do you want to alert the visitor (1 for yes 0 for no)
var message="Right click disabled on images!"; // Your no right click message this line

/*
Disable right click script (Annoy-Close) 
*/

function detail(){
	  if(alertVis == "1") alert(message); 
          alert("You like to right click?")
          alert("How about left clicking?")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          alert("Left Click!")
          if(closeWin == "1") self.close();
          return false;
}
function IE() {
     if (event.button == "2" || event.button == "3"){detail();}
}
function NS(e) {
     if (document.layers || (document.getElementById && !document.all)){
          if (e.which == "2" || e.which == "3"){ detail();}
     }
}
document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false");

//-->
</script>

0



#2 User is offline   d33j4y 

  • Still a n00b hehe!!!
  • Group: Global Mod
  • Posts: 384
  • Joined: 12-September 05
  • Gender:Male
  • Location:Salt Lake City, Utah
  • Interests:Php Coding, mIRC Scripting, Klub Deejaying and being a pain in the arse!

  • img
    Country

Posted 24 July 2010 - 11:09 PM

Very pointless!!! If someone wants to steal an image or view source etc., that code aint gonna stop them!!! ;)
0

#3 User is offline   err0r 

  • Subject Matter Expert
  • Group: Admin
  • Posts: 2,695
  • Joined: 25-February 04
  • Gender:Male
  • Location:Mississippi USA
  • Interests:webdesign, scripting, reading, etc

  • img
    Country

Posted 24 July 2010 - 11:57 PM

i agree one of the most annoying things webmasters do to their sites. but to each their own.

Make money for doing surveys. The best i've found. United States and Canadian residents only.
0

#4 User is offline   CharmedOne 

  • General Poster
  • Group: Members
  • Posts: 130
  • Joined: 06-December 08
  • Gender:Female
  • Location:USA

Posted 25 July 2010 - 05:43 AM

Hahaha ya both of you are right but i was bored & thought of this annoying idea.
0

#5 User is offline   err0r 

  • Subject Matter Expert
  • Group: Admin
  • Posts: 2,695
  • Joined: 25-February 04
  • Gender:Male
  • Location:Mississippi USA
  • Interests:webdesign, scripting, reading, etc

  • img
    Country

Posted 25 July 2010 - 06:12 AM

i'm sure someone will find it useful.. lots of ppl still like to do it.

Make money for doing surveys. The best i've found. United States and Canadian residents only.
0

#6 User is offline   d33j4y 

  • Still a n00b hehe!!!
  • Group: Global Mod
  • Posts: 384
  • Joined: 12-September 05
  • Gender:Male
  • Location:Salt Lake City, Utah
  • Interests:Php Coding, mIRC Scripting, Klub Deejaying and being a pain in the arse!

  • img
    Country

Posted 25 July 2010 - 07:03 AM

If I wanted to be annoyed, Id call my ex-gf lol..
0

#7 User is offline   takaharu_ 

  • Proof-reading pedantic pain in the proverbial
  • View gallery
  • Group: Global Mod
  • Posts: 1,006
  • Joined: 15-February 06
  • Gender:Male

Posted 25 July 2010 - 10:34 PM

View > Source :)

Also, this won't work if someone doesn't have Javascript enabled.


I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.
0

#8 User is offline   d33j4y 

  • Still a n00b hehe!!!
  • Group: Global Mod
  • Posts: 384
  • Joined: 12-September 05
  • Gender:Male
  • Location:Salt Lake City, Utah
  • Interests:Php Coding, mIRC Scripting, Klub Deejaying and being a pain in the arse!

  • img
    Country

Posted 26 July 2010 - 02:21 AM

Some sites have IonCube so alot of times View -> Source aint gonna work either.. but supposively that aint fool proof either..
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic





1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users




lhfooter.gif rfooter.gif