BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › ADDING NO RIGHT-CLICK MENU
- This topic has 3 replies, 2 contibutors, and was last updated 9 years, 7 months ago by Alyssa.
Question
April 23, 2015 at 8:42 am #39263@idurstonHi, I have a script that disables the RIGHT-CLICK menu which is ideal as my photography site has plenty of posts with images that we don’t want ‘save image as’ option. How can I embed the script on to the temple? Currently I have to add the script to each post every time. Id like all pages ideally to disable the right-click menu.
Is it possible?
The script is:
<script language=JavaScript>
<!–//Disable right mouse click Script
var message=”Function Disabled!”;
///////////////////////////////////
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”)
// –>
</script>Answers
April 23, 2015 at 9:25 am #39268@alyssa-buddyboss
AlyssaParticipant@idurston this is definitely not a theme issue but I suggest you put this in the footer.php file in your child theme. If it is not there you may need to copy it from the parent theme.
April 23, 2015 at 10:17 am #39275@idurstonThat works a treat, thanks!!!!!!!!!!!!!!!
April 23, 2015 at 8:22 pm #39293@alyssa-buddyboss
AlyssaParticipantNP
- The question ‘ADDING NO RIGHT-CLICK MENU’ is closed to new replies.