Posted By

zerolab on 09/18/08


Tagged

javascript firebug disable


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

Ashung
kcmr
wizard04
alvaroisorna
guo3823538


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

Posted By: zerolab on March 8, 2009

you never know :)

You need to login to post a comment.