name: "blerg.Blerg",
kind: "Control",
lastHash: null,
+ pathHandlers: [ blerg.User, blerg.Tag, blerg.Feed, blerg.ExternalURLPost, blerg.Welcome ],
handlers: {
onStartSignup: "showSignupDialog",
onTryLogin: "tryLogin",
onLoginFailed: "loginFailed",
onLogoutSuccessful: "logout"}
],
- urlmap: [
- ['search', /^\?post\/([^/]+)\/(.+)/, "blerg.ExternalURLPost"],
- ['hash', /^#\/(ref|tag)\/([A-Za-z0-9_-]+)(?:\/p(\d+))?$/, "blerg.Tag"],
- ['hash', /^#\/feed(?:\/p(\d+))?$/, "blerg.Feed"],
- ['hash', /^#([A-Za-z0-9_-]+)(?:\/(p)?(\d+))?$/, "blerg.User"]
- ],
- pathHandlers: [ blerg.User, blerg.Tag, blerg.Welcome ],
rendered: function() {
this.inherited(arguments);
document.body.addEventListener('keyup', function(event) {
if (event.shiftKey && event.keyCode == 32) {
- this.$.post.show();
+ this.waterfall('onPostVisibility', {showing: true});
event.stopPropagation();
}
- }, false);
+ }.bind(this), false);
},
hashCheck: function() {
if (location.hash != this.lastHash) {
this.$.api.logout();
},
loginSuccessful: function(inSender, inEvent) {
- this.$.api.requestFeedStatus();
- this.feedStatusUpdateInterval = setInterval(function() {
- this.$.api.requestFeedStatus();
- }.bind(this), 900000);
this.waterfall('onLogin', inEvent);
},
loginFailed: function(inSender, inEvent) {