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 (e) {
19 $("#openid_url").val("http://");
20 $("#login_auth_buttons").hide();
21 $("#login_openid_url").show();
22 $("#login_openid_submit").show();
25 // Hide OpenID field for now
26 $("#login_openid_url").hide();
27 $("#login_openid_submit").hide();