Sha256: 78b616b12736768ffc28263d52ad0bf590b96097e61eff4aed5548663bacdcf8

Contents?: true

Size: 551 Bytes

Versions: 78

Compression:

Stored size: 551 Bytes

Contents

'use strict';


var lalala_storage;


// Get lalala storage object from local storage
try {
  lalala_storage = JSON.parse(localStorage.lalala);

} catch(error) {
  console.error(error);

}

// If lalala storage doesn't exist, create empty object
if (!lalala_storage) {
  lalala_storage = {};
}


/**
 * On window unload save lalala storage object to local storage
 */
$(window).unload(function(){
  console.log("storage save");
  localStorage.lalala = JSON.stringify(lalala_storage);
});


/**
 * @export {Object}
 */
module.exports = lalala_storage;

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
lalala-4.1.0.dev.425 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.420 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.419 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.418 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.417 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.416 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.415 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.414 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.413 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.412 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.411 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.410 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.409 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.407 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.408 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.398 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.397 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.396 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.395 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.394 app/assets/javascripts/lalala/modules/storage.module.js