Bonjour,
Est ce que quelqu'un a un bout de script pour bloquer le glisser copier des images sur Mozilla ?
Est ce que quelqu'un a un bout de script pour bloquer le glisser copier des images sur Mozilla ?
if( $show_message ) $comment = "//"; $r_click = " function clickExplorer() { if( document.all ) { ${comment}alert('".str_replace("'", "\'", $message)."'); } return false; } function clickOther(e) { if( document.layers || ( document.getElementById && !document.all ) ) { if ( e.which == 2 || e.which == 3 ) { ${comment}alert('".str_replace("'", "\'", $message)."'); return false; } } } if( document.layers ) { document.captureEvents( Event.MOUSEDOWN ); document.onmousedown=clickOther; } else { document.onmouseup = clickOther; document.oncontextmenu = clickExplorer; } "; $script = " window.addEvent('domready', function() { document.body.oncopy = function() { ${comment}alert('".str_replace("'", "\'", $message)."'); "; if( $disallow_copy ) $script .= " return false; } }); if( typeof( document.onselectstart ) != 'undefined' ) document.onselectstart = function(){ return false }; document.ondragstart = function(){ return false } "; else $script .= " } }); ";
function clickExplorer() {
if( document.all ) {
${comment}alert('".str_replace("'", "\'", $message)."');
}
return false;
}
function clickOther(e) {
if( document.layers || ( document.getElementById && !document.all ) ) {
if ( e.which == 2 || e.which == 3 ) {
${comment}alert('".str_replace("'", "\'", $message)."');
return false;
}
}
}
if( document.layers ) {
document.captureEvents( Event.MOUSEDOWN );
document.onmousedown=clickOther;
}
else {
document.onmouseup = clickOther;
document.oncontextmenu = clickExplorer;
}
window.addEvent('domready', function()
{
document.body.oncopy = function()
{
${comment}alert('".str_replace("'", "\'", $message)."');
return false;
}
});
if( typeof( document.onselectstart ) != 'undefined' )
{
document.onselectstart = function(){ return false };
}
document.ondragstart = function(){ return false }
Commentaire