PageSourceSearch

https://ekssecurity.netlify.app/disable_print_snapshot.js

js ekssecurity.netlify.app collected 2026-10-03 10:41:28 UTC 1,614 bytes, 53 lines download raw bytes

1document.addEventListener('keydown', function(event) {
2    if ((event.ctrlKey || event.metaKey) && (event.key === 'p' || event.key === 'P')) {
3      event.preventDefault();
4      alert('Printing is disabled on this page.');
5    }
6    if (event.key === 'PrintScreen') {
7      event.preventDefault();
8      alert('Taking a snapshot is disabled on this page.');
9    }
10  });
11  
12  document.addEventListener('contextmenu', function(event) {
13    event.preventDefault();
14    alert('Right-click is disabled on this page.');
15  });
16  
17  
18  document.addEventListener('selectstart', function(event) {
19    event.preventDefault();
20  });
21  
22  document.addEventListener('DOMContentLoaded', function() {
23    var printButton = document.querySelector('.print-button');
24    if (printButton) {
25      printButton.style.display = 'none';
26    }
27  });
28  
29  document.addEventListener('DOMContentLoaded', function() {
30    var printButton = document.querySelector('.right-buttons .fa-print');
31    if (printButton) {
32      printButton.parentElement.style.display = 'none';
33    }
34  });
35  
36  
37  // function authenticate() {
38  //   const username = "your_username";
39  //   const password = "your_password";
40  
41  //   let inputUsername = prompt("Enter username:");
42  //   let inputPassword = prompt("Enter password:");
43  
44  //   if (inputUsername === username && inputPassword === password) {
45  //     alert("Access granted.");
46  //   } else {
47  //     alert("Access denied.");
48  //     location.reload();
49  //   }
50  // }
51  
52  // // Run the authentication function when the page loads
53  // window.addEventListener("DOMContentLoaded", authenticate);

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.