// Disable Ctrl+U and Ctrl+P document.addEventListener('keydown', function (e) { // Disable Ctrl+U if (e.ctrlKey && e.key.toLowerCase() === 'u') { e.preventDefault(); alert("wrong key."); } // Disable Ctrl+P if (e.ctrlKey && e.key.toLowerCase() === 'p') { e.preventDefault(); alert("wrong key."); } }); document.addEventListener('keyup', (e) => { if (e.key === 'PrintScreen') { // Create a div element that covers the entire screen const blankScreenDiv = document.createElement('div'); blankScreenDiv.id = 'blank-screen-overlay'; // Add an ID for easier reference blankScreenDiv.style.position = 'fixed'; blankScreenDiv.style.top = '0'; blankScreenDiv.style.left = '0'; blankScreenDiv.style.width = '100vw'; blankScreenDiv.style.height = '100vh'; blankScreenDiv.style.backgroundColor = 'black'; // Or any color you prefer blankScreenDiv.style.zIndex = '99999'; // Ensure it's on top of everything // Append the div to the body document.body.appendChild(blankScreenDiv); // Attempt to clear the clipboard (not guaranteed to work in all browsers/contexts) navigator.clipboard.writeText(''); // IMPORTANT: To keep it blank until refresh, we do NOT remove the div here. // It will persist until the page is reloaded or navigated away from. } }); document.addEventListener('keydown', function(e) { // Check for Ctrl+S (or Cmd+S on Mac) if ((e.ctrlKey || e.metaKey) && e.key === 's') { e.preventDefault(); // Prevent the default browser save action alert('wrong key.'); } }); document.addEventListener('contextmenu', function(e) { // e.preventDefault(); // Uncomment to disable right-click entirely }); // Disable text selection document.addEventListener('selectstart', function (e) { e.preventDefault(); }); // Disable keyboard copy shortcut (Ctrl+C, Command+C) document.addEventListener('keydown', function (e) { if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'c') { e.preventDefault(); } });

Tag: management consulting companies in Qatar

management consulting companies in Qatar

Tax Business Consultant is one of the leading management consulting companies in Qatar, offering strategic solutions to help businesses grow, adapt, and succeed...

  • riswanva
.