+
+// Pager for browsing subscription feeds
+function Feed(m) {
+ Pager.call(this);
+ this.username = loginStatus.username;
+ this.baseFrag = '/feed';
+ this.pageStart = parseInt(m[1]);
+
+ new Ajax.Request(baseURL + '/feed', {
+ method: 'post',
+ parameters: {
+ username: loginStatus.username
+ },
+ onSuccess: function(r) {
+ var response = r.responseText.evalJSON();
+ if (response) {
+ var maxid = response.length - 1;
+ response.each(function(v, i) {
+ v.id = maxid - i;
+ mangleRecord(v, tagRecordTemplate)
+ });
+ this.addItems(response);
+ if (!this.pageStart)
+ this.pageStart = response.length - 1;
+ this.itemCount = response.length;
+ }
+ this.displayItems();
+ }.bind(this),
+ onFailure: function(r) {
+ this.displayItems();
+ }.bind(this)
+ });
+}
+Feed.prototype = new Pager();
+Feed.prototype.constructor = Feed;
+
+Feed.prototype.updateState = function(m) {
+ this.pageStart = parseInt(m[1]) || this.itemCount - 1;
+ this.displayItems();
+
+ return true;
+}
+
+Feed.prototype.show = function() {
+ Pager.prototype.show.call(this);
+ $$('[name=section]').each(function(v) {
+ v.update(' ' + loginStatus.username + "'s spycam");
+ }.bind(this));
+}
+
+
+function postPopup(initial) {
+ if (loginStatus.loggedIn || initial) {