Add "Unspecified" option to pronouns dropdown
This commit is contained in:
parent
994c6d3cde
commit
563e8b49e8
4 changed files with 15 additions and 5 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue