source: extensions/rightClick/template/rightClick_protect.tpl @ 6502

Revision 6502, 661 bytes checked in by vdigital, 10 years ago (diff)

rightClick deactivates the context menu on websized pictures and more.

Line 
1{known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
2{html_head}
3<!-- Provided information by the "rightClick" plugin (version {$RIGHTCK.Version}): {$RIGHTCK.Dir}/template/rightClick_protect.tpl -->
4<script type="text/javascript">
5jQuery.noConflict();
6jQuery(document).ready(function($) {*Smarty*}{ldelim}
7{*Smarty*}{foreach item=selector from=$RIGHTCK.Selectors name=select}
8        $({*Smarty*}'{$selector}').addClass('rightClick');
9{*Smarty*}{/foreach}
10        $(".rightClick").each( function() {*Smarty*}{ldelim}
11                $(this)[0].oncontextmenu = function() {*Smarty*}{ldelim}
12                        return false;
13                }
14        });
15});
16</script> 
17{/html_head}
Note: See TracBrowser for help on using the repository browser.