How to disable F12 for your website to protect your content?

User avatar
Mitch
Posts: 36
Joined: Mon Jan 30, 2017 4:58 am

How to disable F12 for your website to protect your content?

Tue Oct 02, 2018 9:33 am

If you would like to protect your content just place the codes below into an HTML module like you would any other type of code and there you go. Below:

Code: Select all

<script language="JavaScript">
	
/* Copyright Protection F12 */
document.onkeypress = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
           //alert('No F-12');
            return false;
        }
    }
document.onmousedown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
document.onkeydown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
</script>
<!--End Copyright Protection F12 -->
I hope this will help you guys.


Return to “WEBSITE AND WEB DESIGN”

Links

In total there are 11 users online :: 2 registered, 0 hidden and 9 guests
Registered users: Google [Bot], Google Adsense
Most users ever online was 156 on Sun Jun 17, 2018 7:42 am
Total posts 446
Total topics 325
Total members 62
Our newest member anonymous-kali
No birthdays today