Skip to content

Instantly share code, notes, and snippets.

Jarrod Irwin jarrodirwin

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jarrodirwin on github.
  • I am marine0089 (https://keybase.io/marine0089) on keybase.
  • I have a public key ASCy6of8njfj1lRUp5hn8CGX86GK8RDifRYc4OEnCGYbVwo

To claim this, I am signing this object:

@jarrodirwin
jarrodirwin / storagePolyfill.js
Last active Jun 9, 2020 — forked from remy/gist:350433
LocalStorage/SessionStorage Polyfill with Safari Private Browsing support.
View storagePolyfill.js
// Refer to https://gist.github.com/remy/350433
try {
// Test webstorage existence.
if (!window.localStorage || !window.sessionStorage) throw "exception";
// Test webstorage accessibility - Needed for Safari private browsing.
localStorage.setItem('storage_test', 1);
localStorage.removeItem('storage_test');
} catch(e) {
(function () {
var Storage = function (type) {
You can’t perform that action at this time.