X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a47c0a4411825f48e447641094678b15df3b2f74..118347444f0564d427b62535a953401549063303:/app/assets/javascripts/login.js diff --git a/app/assets/javascripts/login.js b/app/assets/javascripts/login.js index c997e538b..74b226bf6 100644 --- a/app/assets/javascripts/login.js +++ b/app/assets/javascripts/login.js @@ -1,4 +1,8 @@ +//= querystring + $(document).ready(function () { + var querystring = require("querystring-component"); + // Preserve location hash in referer if (window.location.hash) { $("#referer").val($("#referer").val() + window.location.hash); @@ -6,9 +10,9 @@ $(document).ready(function () { // Attach referer to authentication buttons $(".auth_button").each(function () { - var params = qs.parse(this.search.substring(1)); + var params = querystring.parse(this.search.substring(1)); params.referer = $("#referer").val(); - this.search = qs.stringify(params); + this.search = querystring.stringify(params); }); // Add click handler to show OpenID field @@ -33,7 +37,7 @@ $(document).ready(function () { if (referer) { args.referer = referer; } - window.location = action + "?" + qs.stringify(args); + window.location = action + "?" + querystring.stringify(args); return false; }); });