问题
Look:
!
Wow!
How can the webpage know I'm using firebug?
BTW I couldn't find out how to show the translucent add banner.
回答1:
You can do:
if(window.console && window.console.firebug)
{
alert("Firebug active!");
}
回答2:
This works not only from the Firebug console, but also from within the page:
if (document.getElementById('_firebugConsole'))
alert("fire!");
回答3:
Both answers will alert if the Firebug user has activated the Console panel. If users disable the Console panel, but leave the rest of Firebug up, the alerts will not fire (because Firebug does not inject the console object in that case).
来源:https://stackoverflow.com/questions/1501170/how-can-the-page-know-im-analyzing-it-with-firebug