Skip to content

Commit

Permalink
Action switching is now a bit more clever
Browse files Browse the repository at this point in the history
  • Loading branch information
fab committed Apr 11, 2012
1 parent 678fa31 commit eed2e49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drink/static/base.js
Expand Up @@ -154,9 +154,10 @@ var Drink = function() {
ui.load_action_list(data.actions);
me.i_like = data.i_like;
setTimeout(me.write_footers, 300);
me.cur_action = window.document.location.pathname.slice(base_path.length);
var desired_action = window.document.location.pathname.slice(base_path.length) || me.d.default_action;
console.log('switch to action', desired_action);
if (!!!me.cur_action) {
me.serve(undefined, me.d.default_action);
me.serve(undefined, desired_action);
}
})
.error(function() {
Expand Down

0 comments on commit eed2e49

Please sign in to comment.