How can the page know I'm analyzing it with firebug

回眸只為那壹抹淺笑 提交于 2019-12-30 08:24:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!