Skip to content

Instantly share code, notes, and snippets.

💪

Andreas Jagelund ajagelund

💪
Block or report user

Report or block ajagelund

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ajagelund
ajagelund / cookie.js
Created Mar 20, 2015
MDN JavaScript cookie framework
View cookie.js
@ajagelund
ajagelund / polyfill_storage.js
Last active Aug 29, 2015
Polyfill fill for localStorage and sessionStorage
View polyfill_storage.js
(function(){
try {
window.__ls = {};
window.localStorage.setItem = function (id, val) { return window.__ls[id] = String(val); };
window.localStorage.getItem = function (id) { return window.__ls.hasOwnProperty(id) ? window.__ls[id] : undefined; };
window.localStorage.removeItem = function (id) { return delete window.__ls[id]; };
window.localStorage.clear = function () { return window.__ls = {} };
console.log('localStorage lap of luxury!');
} catch (e) {
console.log('Reset localStorage failed!');
View iOS-7-web-app.html
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
You can’t perform that action at this time.