We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

zerolab on 09/18/08


Tagged

javascript firebug disable


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

Ashung
kcmr
wizard04
alvaroisorna


Disable Firebug


Published in: JavaScript 


URL: http://www.seifi.org/javascript/sniff-and-disable-firebug-howto-gmail-example.html

Sniff and disable Firebug. Not sure why you'd need it though. Firebug is just great.

  1. // code yanked from the Yahoo media player. Thanks, Yahoo.
  2. if (! ("console" in window) || !("firebug" in console)) {
  3. var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group"
  4. , "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
  5. window.console = {};
  6. for (var i = 0; i <names.length; ++i) window.console[names[i]] = function() {};
  7. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: MMDeveloper on September 18, 2008

it's probably so firebug-using-developers cant see just how horrible their code really is :P

You need to login to post a comment.