1 $(document).ready(function() {
2 // Preserve location hash in referer
3 if (window.location.hash) {
4 $("#referer").val($("#referer").val() + window.location.hash);
7 // Attach referer to authentication buttons
8 $(".auth_button").each(function () {
9 var params = querystring.parse(this.search.substring(1));
10 params.referer = $("#referer").val();
11 this.search = querystring.stringify(params);
14 // Add click handler to show OpenID field
15 $("#openid_open_url").click(function() {
16 $("#openid_url").val("http://");
17 $("#login_auth_buttons").hide();
18 $("#login_openid_url").show();
19 $("#login_openid_submit").show();
22 // Hide OpenID field for now
23 $("#login_openid_url").hide();
24 $("#login_openid_submit").hide();