如何检查是否在Mozilla中安装了firebug? [英] How to check whether firebug is installed in Mozilla or not?

查看:99
本文介绍了如何检查是否在Mozilla中安装了firebug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

检测Firebug的Javascript?

如何检查Firebug是否已安装在Mozilla中或不使用JavaScript代码?

How to check whether Firebug is installed in Mozilla or not using JavaScript code?

推荐答案

在网页的任何地方,您都可以这样做:

anywhere in a web page, you could do this:

<script>
if(console) {
    console.log("Firebug is installed and running!");
} else {
    alert("Firebus either isn't installed, or isn't running.");
}
</script>

如果您特别想检查Firebug,那就不完美了,因为它可能会报告其他浏览器上存在Firebug例如Chrome,因为他们的开发者工具也使用与Firebug相同的控制台对象。如果你真的只需要检查Firebug,那么你也可以添加浏览器检测以确保你在Firefox中。

Not perfect if you specifically want to check for Firebug, because it could report that Firebug exists on other browsers such as Chrome, since their Developer Tools also use the same console object as Firebug. If you really need to only check for Firebug, then you could also add a browser detection to make sure you're in Firefox.

这篇关于如何检查是否在Mozilla中安装了firebug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆