Skip to content

Instantly share code, notes, and snippets.

View eldh's full-sized avatar

Andreas Eldh eldh

View GitHub Profile
@mjackson
mjackson / Dispatcher.js
Created August 21, 2014 19:55
An async version of Facebook's flux dispatcher
var d = require('d');
var warning = require('react/lib/warning');
var Promise = require('es6-promise').Promise;
function isNotNull(object) {
return object != null;
}
function Dispatcher() {
this._currentActionName = null;
@mathiasbynens
mathiasbynens / change-favicon.js
Created June 7, 2010 12:41
Dynamically changing favicons with JavaScript
/*!
* Dynamically changing favicons with JavaScript
* Works in all A-grade browsers except Safari and Internet Explorer
* Demo: http://mathiasbynens.be/demo/dynamic-favicons
*/
// HTML5™, baby! http://mathiasbynens.be/notes/document-head
document.head || (document.head = document.getElementsByTagName('head')[0]);
function changeFavicon(src) {