+function User(m) {
+ Pager.call(this);
+ this.username = m[1];
+ this.baseFrag = m[1];
+ this.permalink = (m[2] != 'p');
+ this.pageStart = parseInt(m[3]);
+}
+User.prototype = new Pager();
+User.prototype.constructor = User;
+
+User.prototype.updateState = function(m) {
+ if (m[1] != this.username)
+ return false;
+
+ this.permalink = (m[2] != 'p');
+ this.pageStart = parseInt(m[3]);
+ this.show();
+
+ return true;
+}
+
+User.prototype.show = function() {
+ Pager.prototype.show.call(this);
+
+ $$('[name=section]').each(function(v) { v.update(' @' + this.username) }.bind(this));
+ $('rss').show();
+ $('rsslink').href = '/rss/' + this.username;
+ $$('[name=user.reflink]').each(function(e) {
+ e.href = '/#/ref/' + this.username;
+ }.bind(this));
+ $('usercontrols').show();
+
+ if (this.permalink && this.pageStart) {
+ this.showRecord(this.pageStart);
+ } else if (this.pageStart) {
+ this.showPageAt(this.pageStart);
+ } else {
+ this.reload();
+ }
+}
+
+User.prototype.hide = function() {
+ Pager.prototype.hide.call(this);
+ $('signup').hide();
+ $('rss').hide();
+ $('usercontrols').hide();
+}
+
+User.prototype.reload = function() {
+ this.pageStart = null;