3 $(document).ready(function () {
4 // Preserve location hash in referer
5 if (window.location.hash) {
6 $("#referer").val($("#referer").val() + window.location.hash);
9 // Attach referer to authentication buttons
10 $(".auth_button").each(function () {
11 var params = Qs.parse(this.search.substring(1));
12 params.referer = $("#referer").val();
13 this.search = Qs.stringify(params);
16 // Add click handler to show OpenID field
17 $("#openid_open_url").click(function () {
18 $("#openid_url").val("http://");
19 $("#login_auth_buttons").hide();
20 $("#login_openid_url").show();
21 $("#login_openid_submit").show();
24 // Hide OpenID field for now
25 $("#login_openid_url").hide();
26 $("#login_openid_submit").hide();