• Home
  • About Jon Dowdle
  • Lifestream
KEEP IN TOUCH

Posts in category Web Design

Remove Firebug’s Console.Debug() calls in 3 lines

Mar11
2009
Written by Jon Dowdle

I love Firebug's console.debug() calls and use them often while writing & debugging Javascript. I find it extremely helpful (it does dump out objects after all) and it is much faster than setting a break point and stepping through. So why would I want all of my console.debug calls not to work?

One of (the many) reasons IE sucks is that it doesn't have an equivalent to Firebug*. Until that glorious day arrives when it does, those calls can render the JS non-functioning. If you have ever seen "console is not defined" you're getting warmer. So to 'neutralize' these calls in any other browser not cool enough to have Firebug all you need is these 3 lines. Don't worry, it shouldn't affect Firefox w/ Firebug installed.

if( typeof(console) == "undefined"){
    console = new Object();
    console.debug = function(str){ alert(str); }
}

* Note: Before anyone yells that there is Firebug Lite, I know that. It still doesn't rule nearly as much. Get Firebug Lite here **

** Note, you don't have to use alert(), actually I implore you not to (it's really annoying)

Tagged firebug, IE

Switch Subdomain Bookmarklet

Feb10
2009
Written by Jon Dowdle

At work it is often necessary for us to swap subdomains to go between working copies, QA and production. So to make this a little easier I've made a simple bookmarklet to do the work for me. Just bookmark the link below to see this in action.

This one is hardcoded to swap the subdomain to "dev".

Subdomain Bookmarklet

Here is one that prompts for the subdomain

Subdomain Bookmarklet

Posted in Code - Tagged javascript, tools
« Older Entries

Recent Posts

  • Code from TDD Demystified through Katas
  • Awesome Web Development Links Found This Week
  • Taggable Demo Video (now with more code)
  • Taggable Demo Video
  • New jQuery Plugin: Taggable

Categories

  • Code
    • MySQL
    • Programming
    • Web Design
  • coldfusion
  • Life
    • Events
  • Reviews
  • Uncategorized
  • Work

Tags

adobe barcamp barcamporlando coldfusion ComplexByteArrayException concat conferences decorator design pattern Events firebug Form fowa html IE ignite infection control iterator javascript job jQuery movies MySql orlando Photos pirate booty pirates plugins poll project python railo software development sql stackoverflow stax.net style taggable tags talk like a pirate tips & tricks tools twitter washington dc Web Design

RSS Syndication

  • All posts
  • All comments

EvoLve theme by Theme4Press  •  Powered by WordPress jDowdle.com