Sha256: 66889e89a00e52efceb5448b3a18903df081e81ce74ae401aeb14f603b084f3c

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

pageflow.Settings = Backbone.Model.extend({
  defaults: {
    volume: 1
  },

  initialize: function() {
    if (window.localStorage) {
      if (localStorage['pageflow.settings']) {
        try {
          this.set(JSON.parse(localStorage['pageflow.settings']));
        }
        catch(e) {
          pageflow.log(e);
        }
      }

      this.on('change', function() {
        localStorage['pageflow.settings'] = JSON.stringify(this);
      });
    }
  }
});

pageflow.settings = new pageflow.Settings();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pageflow-0.8.2 app/assets/javascripts/pageflow/settings.js
pageflow-0.8.1 app/assets/javascripts/pageflow/settings.js
pageflow-0.8.0 app/assets/javascripts/pageflow/settings.js