Sha256: 240fbc247dac7a8331ee1417908b2f8dcef17d155f0f377a6bf63245e877cb3a

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

User = function() {
  this.name = Cookie.find('jschat-name');
  this.hideImages = Cookie.find('jschat-hideImages') === '1' ? true : false;
};

User.prototype.setName = function(name) {
  Cookie.create('jschat-name', name, 28, '/');
  this.name = name;
  $('name').innerHTML = name;
};

User.prototype.setHideImages = function(hideImages) {
  this.hideImages = hideImages;
  Cookie.create('jschat-hideImages', (hideImages ? '1' : '0'), 28, '/');
};

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jschat-0.3.3 lib/jschat/http/public/javascripts/app/models/user.js
jschat-0.3.2 lib/jschat/http/public/javascripts/app/models/user.js
jschat-0.3.1 lib/jschat/http/public/javascripts/app/models/user.js
jschat-0.3.0 lib/jschat/http/public/javascripts/app/models/user.js