]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/auth_providers.js
Lessen code repetition
[rails.git] / app / assets / javascripts / auth_providers.js
index 38a7287a0281cc1e0c849b3b22a6b69216b0036d..18c3e38e0776d85228ce73af56dbc5ee6a16fe61 100644 (file)
@@ -1,20 +1,8 @@
-//= require qs/dist/qs
-
 $(document).ready(function () {
   // Attach referer to authentication buttons
   $(".auth_button").each(function () {
-    var params = Qs.parse(this.search.substring(1));
-    params.referer = $("#referer").val();
-    this.search = Qs.stringify(params);
+    const params = new URLSearchParams(this.search);
+    params.set("referer", $("#referer").val());
+    this.search = params.toString();
   });
-
-  // Add click handler to show OpenID field
-  $("#openid_open_url").click(function () {
-    $("#openid_url").val("http://");
-    $("#login_auth_buttons").hide();
-    $("#openid_login_form").show();
-  });
-
-  // Hide OpenID field for now
-  $("#openid_login_form").hide();
 });