Google is your friend here
function isInspectOpen()
{
console.profile();
console.profileEnd();
if (console.clear) console.clear();
return console.profiles.length > 0;
}
from This question
this function will return true, the user opens the developer tools
change
in response to your comment
$('#header').click(alert(isInspectOpen()))
jquery formatted incorrectly, try:
$('#header').click(function(){
alert(isInspectOpen());
});
source
share