This page is disable Copy and Right Click // Message shown to the user when attempting blocked actions const warningMessage = "This action has been disabled on this website."; // Function to prevent default behavior and show warning function blockAction(e) { e.preventDefault(); // Only show alert for user-initiated actions (not programmatic ones) if (e.isTrusted) { alert(warningMessage); } return false; } // Disable right-click context menu document.addEventListener('contextmenu', blockAction, false); // Disable copy document.addEventListener('copy', blockAction, false); // Disable cut document.addEventListener('cut', blockAction, false); // Disable paste document.addEventListener('paste', blockAction, false); // Disable text selection document.addEventListener('selectstart', blockAction, false); // Block keyboard shortcuts document.addEventListener('keydown', function(e) { // Block Ctrl+C, Ctrl+V, Ctrl+X, Ctrl+A (Windows/Linux) // Block Cmd+C, Cmd+V, Cmd+X, Cmd+A (Mac) if ((e.ctrlKey || e.metaKey) && ['c', 'v', 'x', 'a'].includes(e.key.toLowerCase())) { blockAction(e); } // Block PrintScreen key if (e.key === 'PrintScreen') { blockAction(e); } }, false); // Block drag actions which could be used to drag content elsewhere document.addEventListener('dragstart', blockAction, false); // For touch devices - prevent long press which can bring up copy menu document.addEventListener('touchstart', function(e) { const touchDuration = 500; // Duration threshold for long press (ms) const timer = setTimeout(function() { blockAction(e); }, touchDuration); document.addEventListener('touchend', function() { clearTimeout(timer); }, { once: true }); }, { passive: false }); // Add CSS to prevent selection visually const style = document.createElement('style'); style.textContent = ` body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } `; document.head.appendChild(style); // Disable all browser developer tools shortcuts document.addEventListener('keydown', function(e) { // F12 key if (e.key === 'F12') { blockAction(e); } // Ctrl+Shift+I or Cmd+Option+I (Inspector) if ((e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'i') || (e.metaKey && e.altKey && e.key.toLowerCase() === 'i')) { blockAction(e); } // Ctrl+Shift+J or Cmd+Option+J (Console) if ((e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'j') || (e.metaKey && e.altKey && e.key.toLowerCase() === 'j')) { blockAction(e); } // Ctrl+Shift+C or Cmd+Option+C (Element selection) if ((e.ctrlKey && e.shiftKey && e.key.toLowerCase() === 'c') || (e.metaKey && e.altKey && e.key.toLowerCase() === 'c')) { blockAction(e); } }, false); // Override the default selection behavior document.onselectstart = blockAction; console.log("Content protection script activated");