diff options
author | Starfall <us@starfall.systems> | 2022-05-04 12:00:22 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-05-04 12:00:22 -0500 |
commit | e9b2e11520056d0ec822ac0862923d00c6a1289c (patch) | |
tree | 53b22a4fecda9846fc6c77cf4067c071a6287df0 /app/javascript/core | |
parent | 9ec0ecda66745c892961a917b18354f42dfc1f19 (diff) | |
parent | 58ac5ae643dc57ffd20017c54e7be523deaef156 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/javascript/core')
-rw-r--r-- | app/javascript/core/admin.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/core/admin.js b/app/javascript/core/admin.js index d2db89ca7..ef0a8f267 100644 --- a/app/javascript/core/admin.js +++ b/app/javascript/core/admin.js @@ -101,4 +101,14 @@ ready(() => { const registrationMode = document.getElementById('form_admin_settings_registrations_mode'); if (registrationMode) onChangeRegistrationMode(registrationMode); + + document.querySelector('a#add-instance-button')?.addEventListener('click', (e) => { + const domain = document.getElementById('by_domain')?.value; + + if (domain) { + const url = new URL(event.target.href); + url.searchParams.set('_domain', domain); + e.target.href = url; + } + }); }); |