Add "Unspecified" option to pronouns dropdown

This commit is contained in:
hazycora 2023-09-26 01:21:52 -05:00
parent 994c6d3cde
commit 563e8b49e8
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E
4 changed files with 15 additions and 5 deletions

View file

@ -2,15 +2,21 @@ import {hideElem, showElem} from '../utils/dom.js';
function onPronounsDropdownUpdate() {
const pronounsCustom = document.getElementById('pronouns-custom');
const pronounsInput = document.querySelector('#pronouns-dropdown input');
const pronounsDropdown = document.getElementById('pronouns-dropdown');
const pronounsInput = pronounsDropdown.querySelector('input');
const isCustom = !(
pronounsInput.value === '' ||
pronounsInput.value === 'he/him' ||
pronounsInput.value === 'she/her' ||
pronounsInput.value === 'they/them' ||
pronounsInput.value === 'it/its'
);
if (isCustom) {
pronounsCustom.value = pronounsInput.value;
if (pronounsInput.value === '!') {
pronounsCustom.value = '';
} else {
pronounsCustom.value = pronounsInput.value;
}
pronounsCustom.style.display = '';
} else {
pronounsCustom.style.display = 'none';