Skip to content

Instantly share code, notes, and snippets.

View samuelcole's full-sized avatar

Sam Cole samuelcole

View GitHub Profile
@samuelcole
samuelcole / storage_polyfill.js
Created June 7, 2011 21:24 — forked from remy/gist:350433
Storage polyfill
/*
Storage Polyfill by Remy Sharp.
Delinted by Samuel Cole.
*/
if (typeof window.localStorage === 'undefined' || typeof window.sessionStorage === 'undefined') {
(function () {
var Storage = function (type) {
function createCookie(name, value, days) {