David Walsh Tutorials

  • By
    Get HTML5 Video Duration

    HTML5 video is exciting, if only for the reason that we no longer need Flash or other third party plugins to render media.  We can also create custom controls and displays around the video, and one of those displays should be the duration of the video.  Let me...

  • By
    Web Notifications API

    Every UI framework has the same set of widgets which have become almost essential to modern sites: modals, tooltips, button varieties, and notifications.  One problem I find is each site having their own widget colors, styles, and more -- users don't get a consistent experience.  Apparently the...

  • By
    Indent JSON with JavaScript

    Working with XML and JavaScript is a nightmare, which is why JSON has become gold in the development community.  Hell, I even wrote a function to turn XML to JSON with JavaScript.  If you want to turn an existing object into well formatted JSON, you can you JSON.stringify(obj), but...

  • By
    Add HTML Elements to XUL Addons

    I've been working on a new addon at Mozilla which isn't anywhere near finished so I wont bother telling you what it's meant to do...because it could change at any moment.  Since this is my first real addon, it's been a struggle, but that's a good...

  • By
    Watch Files and Directories with Node.js

    Watching a file or directory for changes is an important part of automation.  We all enjoy using our favorite CSS preprocessor's "watch" feature -- we can still refresh the page and see our changes as though we were simply writing in pure CSS.  Node.js makes both file...

  • By
    Sync Gulp Tasks with run-sequence

    gulp.js is an awesome utility for so many things.  I've recently started using gulp as a build tool for the next blog redesign, whenever that may come.  In the past I had written my own build scripts but they quickly got messy and I ran into...

  • By
    JavaScript Battery API: Promises

    Working at Mozilla has afforded me the time to look at new APIs, one of them being the Battery API.  I wrote about the Battery API a while back, when the API was fresh into browsers.  Since then the Battery API has changed, implementing a promise-based...

  • By
    Mighty Deals:  Microthemer: Code-Free Visual WP Theme and Plugin Editor

    WordPress' open-source nature offers a tremendous amount of freedom when it comes to creating and adjusting your themes. But if you're not an expert in HTML or CSS, it can be a major hassle! Well, put your frustrations aside, because with Microthemer from

  • By
    Font Smoothing in Webkit and Firefox

    I don't pretend to be a typography or design expert -- I just know what looks good and what doesn't.  A few years ago I saw a few CSS properties I didn't recognize and when I toggled them on and off, the text went from beautiful to...not...

  • By
    10 Deals You Cannot Pass Up

    Nobody can pass up a good deal, that is perhaps the most well known truth about all of us. Unfortunately, not all deals are as exciting, for example, I would love to get 50% discounts on WordPress themes from a daily deals website, but am less...