Having inspect element in Google chrome hastens debugging process of website. We will just hover over an element and wallah! We can get the css or the technique on how that element was designed. You can also delete that element on that page. Take for instance, removing those annoying popups or changing the opacity of modal boxes. It has its benefits for debugging. But what if, we want it the other way around. What if we want to make it harder for our knowledgeable users to just delete the element. Well, it's pretty simple. The code below will disable inspect element in your website.
$(document).bind("contextmenu",function(e) { e.preventDefault(); });
Pretty neat right! Of course, it has it's downfall. If javascript is disabled, you can't use that. But then again, who disables their javascript nowadays? And if he does disable javascript, you probably should have a backup of noscript js. Well, that's another topic to discuss.
It works! BUT.. f12 and menu > more tools > tools are still working. How to disable all of it?
ReplyDeleteYou need to use a reg file download or modify the local group policy editor.
Deletehttp://www.sevenforums.com/tutorials/152554-internet-explorer-f12-developer-tools-enable-disable.html
Hello, Datepicker is properly work in chrome and mozila but in Internet Explorer when i do inspect element then i can change date.
DeleteHow to solved this issues ?
Thanks,
Pratik
Visit our website and get top Relationship advice also Marriage tips.
Deletehttps://www.pyarmeindia.com
hello
ReplyDeleteit`s working ... but when i press control+shift+i , i can see the page soures..
ReplyDeleteKumar g use below code
ReplyDelete$(document).keydown(function(event){
if(event.keyCode==123){
return false;//Prevent from F12
}
else if(event.ctrlKey && event.shiftKey && event.keyCode==73){
return false; //Prevent from ctrl+shift+i
}
});
I tried to use the code but it says that The entity name must immediately follow the '&' in the entity reference so I am a bit confused.....
Deletemay i know where to put this code.. sorry im new with website
ReplyDeletehttps://codeinaspdotnet.blogspot.com/2017/07/disable-right-click-inspect-element-and.html
ReplyDeleteproper example to hide inspect element, short cut keys and view page source
ReplyDeletei disabled ctrl+alt+c, f12, right click but inspect element can be open by open from any other page and then open my page or press f12 on title bar.
This is a XSS Attack Biatch^^1
ReplyDelete"onmouseover=prompt(/XSSPOSED/)
ReplyDelete\";alert('XSS');//
ReplyDeleteLol
ReplyDeleteLOL2
ReplyDelete
ReplyDeletetest
ReplyDeleteskssga
ReplyDelete¼script¾alert(¢XSS¢)¼/script¾
ReplyDeletelol
ReplyDeletess
ReplyDeleteclick me!
ReplyDeleteclick me!
ReplyDeleteDISCORD
ReplyDeleteXSS
ReplyDeleteBXF
ReplyDeleteiframe>>XSS
ReplyDeleteNice
ReplyDeleteGet top Blogger related tips only available
https://www.gourabdesign.com