| Server IP : 198.54.115.198 / Your IP : 216.73.216.142 Web Server : LiteSpeed System : Linux server192.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : seatpheu ( 1569) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/seatpheu/public_html/wp-content/plugins/protect-uploads/assets/js/ |
Upload File : |
/**
* Handle image protection in the frontend
*
* @package Protect_Uploads
*/
/* global jQuery */
( function( $ ) {
'use strict';
/**
* Disable right-click on images
*/
$( document ).on( 'contextmenu', 'img', function( e ) {
e.preventDefault();
return false;
} );
/**
* Disable drag-and-drop on images
*/
$( document ).on( 'dragstart', 'img', function( e ) {
e.preventDefault();
return false;
} );
/**
* Disable keyboard shortcuts
*/
$( document ).on( 'keydown', function( e ) {
// Ctrl/Cmd + S.
if ( ( e.ctrlKey || e.metaKey ) && 83 === e.keyCode ) {
e.preventDefault();
return false;
}
// Ctrl/Cmd + Shift + I or Ctrl/Cmd + Shift + C.
if ( ( e.ctrlKey || e.metaKey ) && e.shiftKey && ( 73 === e.keyCode || 67 === e.keyCode ) ) {
e.preventDefault();
return false;
}
} );
} )( jQuery );