Advanced Right Click Disable
Add a copyright warning. Instead of silently failing, this script intercepts the right-click event and actively displays an alert box informing the user that the content is protected.
Right-Click Me
A copyright alert will appear.
Copy the Script
<script>
document.oncontextmenu = function() {
alert("Copyright 2025. All Rights Reserved.");
return false;
}
</script>
Frequently Asked Questions
Yes. You can change the string inside the 'alert()' function to display your own copyright notice or terms of use.
No. This script only intercepts the mouse right-click. To block keyboard copying, you would need to listen for the 'keydown' event (Ctrl+C).
No JavaScript protection is 100% secure. Disabling JavaScript in the browser settings bypasses this immediately. It acts as a deterrent, not a lock.