Team:RHIT/Current Team
From 2012.igem.org
(Difference between revisions)
Line 22: | Line 22: | ||
</script>--> | </script>--> | ||
<script> | <script> | ||
- | $( | + | function $_GET(q,s) { |
- | + | s = s ? s : window.location.search; | |
- | + | var re = new RegExp('&'+q+'(?:=([^&]*))?(?=&|$)','i'); | |
- | + | return (s=s.replace(/^?/,'&').match(re)) ? (typeof s[1] == 'undefined' ? '' : decodeURIComponent(s[1])) : undefined; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
function page1() { | function page1() { | ||
$('#rhit-blueSheet').show(); | $('#rhit-blueSheet').show(); | ||
Line 56: | Line 51: | ||
$('#rhit-fourthSheet').show(); | $('#rhit-fourthSheet').show(); | ||
} | } | ||
+ | $(document).ready(function () { | ||
+ | var page = $('#menubar.right-menu').find('#pt-userpage'); | ||
+ | if (page.length == 0) return undefined; | ||
+ | var username = page.children('a').text(); | ||
+ | if(username != undefined) { | ||
+ | $('#user-link').text(username).attr('href', '/User:' + username); | ||
+ | $('#logged_out').hide(); | ||
+ | $('#logged_in').show(); | ||
+ | } | ||
+ | var pageNum = $_GET('page'); | ||
+ | window[pageNum]; | ||
+ | }); | ||
</script> | </script> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> |
Revision as of 03:24, 2 October 2012