Skip to content

Instantly share code, notes, and snippets.

View joshsadler's full-sized avatar

Josh Sadler joshsadler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am joshsadler on github.
  • I am joshsadler (https://keybase.io/joshsadler) on keybase.
  • I have a public key ASBZCqt0Mzz14340xvzAkrxhfBwBJkcFL5Nz9cMgFcc6rAo

To claim this, I am signing this object:

<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@joshsadler
joshsadler / gist:5421277
Created April 19, 2013 15:56
Check if the DOM is ready in native Javascript.
(function(){
var DomReady = window.DomReady = {};
// Everything that has to do with properly supporting our document ready event. Brought over from the most awesome jQuery.
var userAgent = navigator.userAgent.toLowerCase();
// Figure out what browser is being used
var browser = {