mirror of https://gitgud.io/fatchan/jschan.git
parent
f5c834a5d6
commit
042445d28c
19 changed files with 103 additions and 50 deletions
@ -0,0 +1,13 @@ |
||||
window.addEventListener('DOMContentLoaded', function(e) { |
||||
|
||||
const customFlagInput = document.getElementById('customflag'); |
||||
const selectedFlagImage = document.getElementById('selected-flag'); |
||||
if (customFlagInput && selectedFlagImage) { |
||||
const updateFlag = () => { |
||||
selectedFlagImage.src = customFlagInput.options[customFlagInput.options.selectedIndex].dataset.src || ''; |
||||
}; |
||||
customFlagInput.addEventListener('change', updateFlag, false); |
||||
updateFlag(); |
||||
} |
||||
|
||||
}); |
Loading…
Reference in new issue