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.392 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.393 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.391 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.390 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.389 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.388 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.387 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.386 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.385 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.384 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.382 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.381 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.376 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.375 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.374 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.372 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.368 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.367 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.0.0.dev.366 app/assets/javascripts/lalala/modules/storage.module.js
lalala-4.1.0.dev.360 app/assets/javascripts/lalala/modules/storage.module.js