Loading...

Web

How To Disable Right Click & F12 Key on a Website (Latest)

How To Disable Right Click & F12 Key on a Website (Latest)

Disable Right Click & F12 Key on a Website: Hi in an Article, How to disable right click javascript to avoid content copying.

How To Add

For WordPress

Just copy and paste below code into your website head section, so goto Appearance, Editor and find the header.php file and paste below code above </head>.

For Google Blogger

Just copy and paste below code into your website head section, so go to Themes and then to edit HTML, paste code above </head>.

For Custom Website(PHP, HTML)

Just copy and paste below code into your website head section, so go to edit HTML, paste code above </head>.

Javascript Code

For Disabled Right Click And F12 key

<script>
window.oncontextmenu = function () {
return false;
}
$(document).keydown(function (event) {
if (event.keyCode == 123) {
return false;
}
else if ((event.ctrlKey && event.shiftKey && event.keyCode == 73) || (event.ctrlKey && event.shiftKey && event.keyCode == 74)) {
return false;
}
});
</script>

For Disabling Copy Text

-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently */

Thanks For Visiting, Team NoobSpot.Com

To top