How to Disable Inspect Element in Blog - KhalistaBlog -->
Skip to content Skip to sidebar Skip to footer

How to Disable Inspect Element in Blog

How to Disable Inspect Element in Blog - Inspect Element is one of the most useful features of desktop version browser capable of showing, editing, and even changing the HTML code extracted from the source site. Inspect Element is often used by blog designers to find code like CSS code, HTML, JavaScript on blog.

How to Disable Inspect Element in Blog

If you do not want your theme code on Inspect Element known by others, you can prevent that from happening by installing debugger script which your blog will become more secure from copy paste certain code directly through Inspect Element.

How to Disable Inspect Element in Blog


Here's How to Disable Inspect Element in Blog, please follow the following easy steps.

Go to Blogger >> Click the Theme menu >> Choose Edit HTML and add the code below, just before the closing code </body> or &lt;!--</body>--&gt;&lt;/body&gt;
<script type='text/javascript'>
//<![CDATA[
// Inspect
!function t(){try{!function t(n){1===(""+n/n).length&&0!==n||function(){}.constructor("debugger")(),t(++n)}(0)}catch(n){setTimeout(t,5e3)}}();
//]]>
</script>

Then Save. Done

For the results can check on your blog by opening the Inspect menu (right click on the blog page).

Of course this is not an effective way to protect your blog theme code. Many paths to Rome, so there are many ways to know the theme of the blog code one of them is to disable Javascript on your blog in the browser as I've shared in the post about Adding Adblocker Adsense Notification in the blog

To prevent it, you can add the code below.

Add the following code before </head> or &lt;/head&gt;&lt;!--<head/>--&gt;
<noscript>
<style type='text/css'>
/* No Script */
body,html{overflow:hidden}

.noscript{background:#e74c3c;color:#fff;padding:8% 0 0 0;position:fixed;bottom:0;left:0;top:0;right:0;z-index:1000;height:auto;-webkit-transform:translateZ(0);transform:translateZ(0);overflow:hidden}
.noscript p{margin:0;text-align:center;padding:0 20px 10px 20px;margin:auto;font-size:3rem;line-height:1.5;font-family:monospace;max-width:1010px;text-transform:uppercase;font-weight:700}
.noscript p span{color:#ffe88b;font-size:10rem;line-height:normal;font-weight:normal}
</style>
</noscript>

Then add the following code just below </body>
<noscript>
<div class='noscript'>
  <p><span>&#9888;</span></p>
  <p>Please Enable Javascript to view our site content</p>
  <p>Thank you</p>
</div>
</noscript>

Click the Save theme button

To be more protected my friend can also install Anti right click code and disable CTRL + U function on blog like this.

Replace <body> with the code below
<body oncontextmenu='return false;' onkeydown='return false;' onmousedown='return false;' ondragstart='return false' onselectstart='return false' style='user-select:none;cursor:default'>

Or it could be with Javascript code below, add before </body> or &lt;!--</body>--&gt;&lt;/body&gt;
<script type='text/javascript'>
//<![CDATA[
// Anti Click Right
var message="Function Disabled!";function clickIE4(){if(2==event.button)return alert(message),!1}function clickNS4(e){if((document.layers||document.getElementById&&!document.all)&&(2==e.which||3==e.which))return alert(message),!1}document.layers?(document.captureEvents(Event.MOUSEDOWN),document.onmousedown=clickNS4):document.all&&!document.getElementById&&(document.onmousedown=clickIE4),document.oncontextmenu=new Function("alert(message);return false");
//]]>
</script>

Click the Save theme button

But by installing Anti right click code and disable CTRL + U function on this blog I do not recommend. Because I think personally if find the site that installed the code will make me uncomfortable in exploring every post therein, so the result I always close the site immediately. But if according to my friend useful yes please installed, adjusted back to the needs.

A few articles I can share this time about How to Disable Inspect Element in Blog. Hopefully with a short enough article this can be useful for you and good luck.

1 comment for "How to Disable Inspect Element in Blog"

  1. Automatic optical inspection Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.

    ReplyDelete

Provide comments relevant to the posted articles and provide critiques and suggestions for the progress of the blog