1

Topic: Disable right click on alls content

Hi, i have post this script because there is not a script that works well for this.
Whit this you can disable right click on alls content, img, text, ect, put in yourtemplate/header.tpl after this line:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Code:
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" language="javascript">
        $(function() {
            $(this).bind("contextmenu", function(e) {
                e.preventDefault();
            });
        });
    </script>

This work also on zoom pictures, tested on firefox 3.6.10, flock 2.03, ie 8.

2

Re: Disable right click on alls content

This script does not solve the whole problem of copying, if a user is practical there is not always a way to copy!
I have add one little tricks, becouse for admin maybe is not good have the right mouse disable, this code enable mouse for admin and another my group, (change only the group id), enjoy...

<!-- IF session.group_id != "1" AND session.group_id != "44" -->
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" language="javascript">
        $(function() {
            $(this).bind("contextmenu", function(e) {
                e.preventDefault();
            });
        });
    </script><!-- ENDIF -->

Last edited by maxjob2 (2010-09-21 22:02:10)