Disable right clicks

mortiis
by mortiis · 10 posts
16 years ago in IMVU Homepage Codes
Posted 16 years ago · Author
Put this in the"About Me" section of you're HP This will stop people fron stealing you're stickers or whatever. Most of the time anyways..lol





Code
<SCRIPT>
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>
Posted 16 years ago · Author
I know I am supposed encrypt the code but I didn't realize I forgot to. Thanks for the heads up. Peace
Posted 16 years ago
This is the really irritating thing . Ugh, developers put their actual stickers with no right click so you can't save the image. Makes me to turn my head in the temporary folders and find the source myself. Or just see the avatar sites of those who bought it (In other words, the comments section).

Yeah, this is how do I call it...this code will not work for developers. I can find the source in the temporary folders. I like when developers put a "sample" sign over the image...that...beats it! However, they should allow no comments about their product since those who will comment have a high chance that they have the original sticker in their hp.
Posted 15 years ago
post right code ...
Posted 15 years ago
yes...
i put this code on my page and when i click on it it show me pop out with messge about blocked click
but it also let u click on it and choose whatever u wanted ...
it dont prevent it just pop out message like its blocked ..
Posted 15 years ago
Sorry ejo, this worked a year ago, but browsers have changed since then. I will look up the new code.

Here:

Code
<script>
var message="";
function clickIE() {
if (document.all) {(message);
return false;}}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{
document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false")
</script>
Posted 15 years ago
Is there a code that also blocks the Crtl + C thingie?
That way no one can steal the texts :P
Posted 15 years ago
Try this:

Code
<script language="JavaScript"> 

<!--
// No rightclick script v.2.5

var message="Sorry, that function is disabled.\nThis Page copyrighted and\nImages and Text protected!\nALL RIGHTS RESERVED";

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->

</script>


or this:

Code
<asp></asp>


or this:

Code
<head><title>Untitled Page</title><script language="javascript">function DisableRightClick(event){//For mouse right click if (event.button==2){alert("Right Clicking not allowed!");}}function DisableCtrlKey(e){var code = (document.all) ? event.keyCode:e.which;var message = "Ctrl key functionality is disabled!";// look for CTRL key pressif (parseInt(code)==17){alert(message);window.event.returnValue = false;}}</script></head>


example:

Code
<body>  <form>  <div>      <strong>      Right click disabled</strong> textbox      <br>      <asp>      </asp><br>      <br>      <strong>Ctrl key </strong>disabled<br>      <asp>      </asp><br>      <br>          Another method to disable<strong> Cut,Copy and paste      </strong>in textbox<br>      <br>      <asp>      </asp>  </form></body>

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT