Team:RHIT/static/wiki.js

From 2012.igem.org

Revision as of 18:16, 17 July 2012 by Frenchra (Talk | contribs)

var get_login = function()

{
  var page = $('#menubar.right-menu').find('#pt-userpage');
  if(page.length == 0) return undefined;
  return page.children('a').text();
}  
var set_login = function(username)
{
  if(username != undefined)
  {
    $('#user-link').text(username).attr('href', '/User:' + username);
    $('#edit-link').text('Edit Page');
    $('#edit-intro-link').text('Edit Introduction');
    $('#logged_out').hide();
    $('#logged_in').show();
  }
}