Skip to content

Commit

Permalink
Closes #39. No longer requires a user to be logged out.
Browse files Browse the repository at this point in the history
  • Loading branch information
JessieAMorris committed May 20, 2013
1 parent bb9e66e commit 14c1340
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions app/js/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,42 @@ $(document).ready(function() {
page('*', view_notfound);
page();

// --------------------------------------------
// Check query parameters
var query = window.location.search.substring(1);

var currentView = 'loading';
if (CloudOS.authenticatedSession()) {
Navbar_Show_Auth();
page('/friends');
if(query === ""){
page('/friends');
}
} else {
Navbar_Show_Anon();
show_view('home');
}

// --------------------------------------------
// Check query parameters
var query = window.location.search.substring(1);
// console.debug("QUERY: ", query);
if (query != "") {
if (query === "friends")
page("/friends")
page("/friends");
else if (query.match(/login\&.+$/))
page("/"+query)
page("/"+query);
else if (query.match(/signup\&.+$/))
page("/"+query)
page("/"+query);
else if (query === "about")
page("/about")
page("/about");
else if (query === "finder")
page("/finder")
page("/finder");
else if (query === "profile")
page("/profile")
page("/profile");
else if (query.match(/friend\/.+$/))
page("/"+query)
page("/"+query);
else if (query.match(/message\/.+$/))
page("/"+query)
page("/"+query);
else if (query.match(/invite\=.+$/)) {
var inviteToken = getQueryVariable('invite')
page("/invite/"+inviteToken)
var inviteToken = getQueryVariable('invite');
page("/invite/"+inviteToken);
} else {
// console.debug('Unrecognized query string: ', query);
}
Expand Down

0 comments on commit 14c1340

Please sign in to comment.