This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// around 5MB, matching common localStorage limit | |
var STORAGE_SIZE_DEFAULT_LIMIT = 5000000; | |
var InMemoryStorage = function () { | |
this.storage = {}; | |
this.size = 0; | |
}; | |
_.extend(InMemoryStorage.prototype, { | |
setItem: function (key, value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'underscore', | |
'marionette' | |
], function(_, Marionette) { | |
'use strict'; | |
/** | |
* SecureRouter | |
* | |
* This class is similar to the marionette Approuter except |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
}; | |
NodeList.prototype.__proto__ = Array.prototype; |