Long Text Lines in Webkit
10 Jan 2012
Firefox Extensions: Add Button to Nav Bar
2 Nov 2011
The new Add-On SDK for Firefox rocks! It is so easy to create and test using the cfx command line utility.
One thing that is conspicuously absent is the ability to add a button to the navigation toolbar. You know, the toolbar that holds the URL bar and bookmarks button. It took a fair amount of research and trial and error, but it turns out to be a small bit of code.
CSS Conditional Rules: Exciting and Scary
8 Sep 2011
This month the W3C came out with a brand new working draft for CSS Conditional Rules (W3C Draft).
Conditional rules are basically @-rules that apply CSS only when certain conditions are met. The most powerful is the @supports condition. You might be able to guess how it works by looking at the example below.
Why Emails Suck
7 Sep 2011
jsPerf.com Introduces Graphs
31 Aug 2011
If you haven't seen jsPerf.com, you've been missing out. You can benchmark pieces of JavaScript against each other. The site was created by Mathias Bynens (blog) and the benchmarking engine, Benchmark.js, was created by John-David Dalton (blog).
JavaScript is by nature only acurate to 1 millisecond, and some browsers are acurate to only 15 milliseconds in practice. Benchmark.js uses higher resolution timers where available. For browsers it utilizes a Java Applet to access a high-precision timer. When Chrome or NodeJS are run with a --enable-benchmarking flag, it makes use of a native microsecond timer.
A JavaScript Phone: Microsoft's Night Terrors
24 Aug 2011
Today Mozilla announced their proposal for providing phone-like functionality to the browser in this hacks.mozilla.org article. Their goal is to provide "basic HTML5 phone experience within 3 to 6 months."
Specifically, they want to provide JavaScript APIs for accessing the phone dialer, address book, SMS, and more. We already have support on Android and iOS for getting geolocation data from GPS. There is also some support for taking photos using only JavaScript. And don't forget the FileReader and FileWriter APIs.
Using JavaScript in Photoshop
22 Aug 2011
Did you realize that you can write macros and scripts for Photoshop in JavaScript? Yes, JavaScript is everywhere. JSPatterns.com has a great article explaining how to write JavaScript for Photoshop.
In his example, author Stoyan Stefanov takes a layered Photoshop file, shows and hides certain layers, and saves the resulting image to a .png file. The files he saved were charts of guitar chords--156 images saved in an instant.
Google Plus Icon in CSS Using a Single Empty Div
18 Aug 2011
I was inspired by the idea that you can make a wide range of shapes using only CSS on a single div after reading this css-trics.com page. A few days ago I created a Facebook Icon using a single empty div. Today I created the Google Plus Icon using a single empty div:
JSON++: The Structured Clone Algorithm
17 Aug 2011
I was using window.postMessage yesterday and ran into this nugget on hacks.firefox.org:
The window.postMessage() method now uses the structured clone algorithm to let you pass JavaScript objects instead of just strings from one window to another.
The Structured Clone Algorithm is an HTML5 specification for serializing complex data structures. The following are data structures that the algorithm can store that JSON cannot.

