Technical Details
Forum version : #PunBB
Position : Founder
Concerned browser(s) : Other
Screenshot of problem :
Who the problem concerns : All members
When the problem appeared :
Forum link : http://www.graphicballoon.com/
Description of problem
Hello everyone,I have added a script to my site, which disables the right click option for everyone. However, it is rather bothersome for the members, so I'd like to ask if it was possible to add a code that disables the right click option only for guests and members are free to continue using it.
- The code I'm using now:
- Code:
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Ask before you take something. :)";
///////////////////////////////////
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")
// -->
Thanks in advance for any help!
Last edited by Mimóza on 26/4/2016, 17:58; edited 1 time in total