+
+// Pager for browsing subscription feeds
+function Feed() {
+ this.initPager();
+ this.username = loginStatus.username;
+ this.baseFrag = '/feed';
+
+ 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);
+ 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.show = function() {
+ $$('[name=section]').each(function(v) {
+ v.update(' ' + loginStatus.username + "'s spycam");
+ }.bind(this));
+ $('welcome').hide();
+ $('post').hide();
+ $('older_link').hide();
+ $('newer_link').hide();
+ $('rss').hide();
+ items.show();
+ $('usercontrols').hide();
+}
+
+
+function postPopup(initial) {
+ if (loginStatus.loggedIn || initial) {