1(function( $ ) { 2 'use strict'; 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 31 32 jQuery(document).ready(function($) { 33 34 /* 35 var theme_message_div = document.createElement('div'); 36 theme_message_div.setAttribute("id", "show_message"); 37 document.getElementsByTagName('body')[0].appendChild(theme_message_div); 38 39 function show_toast_message(message_value) { 40 var x = document.getElementById("show_message"); 41 x.innerHTML = message_value; 42 x.className = "show"; 43 setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); 44 } 45 46 window.onload = function() { 47 document.addEventListener("contextmenu", function(e){ 48 e.preventDefault(); 49 show_toast_message('Mouse Right Click Disable'); 50 }, false); 51 document.addEventListener("keydown", function(e) { 52 //document.onkeydown = function(e) { 53 // "I" key 54 if (e.ctrlKey && e.shiftKey && e.keyCode == 73) { 55 disabledEvent(e); 56 show_toast_message('Inspect Element Disable'); 57 } 58 // "J" key 59 if (e.ctrlKey && e.shiftKey && e.keyCode == 74) { 60 disabledEvent(e); 61 show_toast_message('J key Disable'); 62 63 } 64 // "S" key + macOS 65 if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { 66 disabledEvent(e); 67 show_toast_message('Save Disable'); 68 69 } 70 // "U" key 71 if (e.ctrlKey && e.keyCode == 85) { 72 disabledEvent(e); 73 show_toast_message('Sorce Code Disable'); 74 75 } 76 // "F12" key 77 if (event.keyCode == 123) { 78 disabledEvent(e); 79 show_toast_message('F12 key Disable'); 80 } 81 // "C" key 82 if (event.keyCode == 67) { 83 disabledEvent(e); 84 show_toast_message('Copy Disable'); 85 86 } 87 88 }, false); 89 function disabledEvent(e){ 90 if (e.stopPropagation){ 91 e.stopPropagation(); 92 } else if (window.event){ 93 window.event.cancelBubble = true; 94 } 95 e.preventDefault(); 96 return false; 97 } 98 }; 99 */ 100 101 }); 102 103 104})( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.