- <?php
- /**
- * @since 1.0.0
- * @package RC_No_Copy
- * @wordpress-plugin
- * Plugin Name: RC - NoCopy
- * Description: Disable Text Selection,Right Click, and CTRL + S, U, I, A, P, F12
- * Version: 4.0.0
- * Author: Razvan Cilibeanu
- * Author URI: razvancilibeanu.com
- * Text Domain: no-copy
- */
- // If this file is called directly, abort.
- die;
- }
- add_action('init', function() {
- if (is_user_logged_in()) {
- }else{
- add_action('wp_head', 'prevent_copy');
- function prevent_copy()
- { echo " <SCRIPT>document.addEventListener('contextmenu',e=>e.preventDefault()),document.onkeydown=function(e){if((e=e||window.event).ctrlKey)switch(e.which||e.keyCode){case 83:case 85:case 73:case 67:case 65:case 80:case 87:case 123:e.preventDefault(),e.stopPropagation()}};(function($){ $(document).keydown(function (event) {if (event.keyCode == 123) {return false;}});})(jQuery);</SCRIPT><script type='text/javascript'>if ( window.self !== window.top ) { window.top.location.href=window.location.href;}</script><style>* {-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: -moz-none;-o-user-select: none;user-select: none;}</Style>"; }
- }
- }
- }
- );
Powered by Exypnos Digital