diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-01 16:52:27 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-05-01 16:52:27 +0200 |
commit | 392ca0472a50ea930f46e22dccf5ce55b04ef588 (patch) | |
tree | 9f8c6b3dcb11a620a417205f9554e8d37e5f3e12 /app/javascript/core | |
parent | 252deefe3433d0cedafd973becd0d85b5182eb49 (diff) | |
parent | 33f3818d660c67194f94c7ff2bb180f4865e6748 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/packs/admin.js`: Conflicts due to glitch-soc's theming system. Upstream changes have been ported to `app/javascript/core/admin.js` - `app/models/trends/statuses.rb`: Minor conflict due to glitch-soc's option to allow CWed toots in trends. Ported upstream changes.
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; + } + }); }); |