@@ -679,45 +679,34 @@ async function fillSettingsPage(): Promise<void> {
679679 Config . keymapSize
680680 ) ;
681681
682- if ( customLayoutFluidSelect === undefined ) {
683- const customLayoutfluidElement = document . querySelector (
684- ".pageSettings .section[data-config-name='customLayoutfluid'] select"
685- ) as Element ;
686-
687- customLayoutFluidSelect = new SlimSelect ( {
688- select : customLayoutfluidElement ,
689- settings : { keepOrder : true } ,
690- events : {
691- afterChange : ( newVal ) : void => {
692- const customLayoutfluid = newVal . map ( ( it ) => it . value ) . join ( "#" ) ;
693- if ( customLayoutfluid !== Config . customLayoutfluid ) {
694- void UpdateConfig . setCustomLayoutfluid ( customLayoutfluid ) ;
695- }
696- } ,
682+ customLayoutFluidSelect = new SlimSelect ( {
683+ select :
684+ ".pageSettings .section[data-config-name='customLayoutfluid'] select" ,
685+ settings : { keepOrder : true } ,
686+ events : {
687+ afterChange : ( newVal ) : void => {
688+ const customLayoutfluid = newVal . map ( ( it ) => it . value ) . join ( "#" ) ;
689+ if ( customLayoutfluid !== Config . customLayoutfluid ) {
690+ void UpdateConfig . setCustomLayoutfluid ( customLayoutfluid ) ;
691+ }
697692 } ,
698- } ) ;
699- }
693+ } ,
694+ } ) ;
700695
701- if ( customPolyglotSelect === undefined ) {
702- const customPolyglotElement = document . querySelector (
703- ".pageSettings .section[data-config-name='customPolyglot'] select"
704- ) as Element ;
705-
706- customPolyglotSelect = new SlimSelect ( {
707- select : customPolyglotElement ,
708- data : getLanguageDropdownData ( languageGroups ?? [ ] , ( language ) =>
709- Config . customPolyglot . includes ( language )
710- ) ,
711- events : {
712- afterChange : ( newVal ) : void => {
713- const customPolyglot = newVal . map ( ( it ) => it . value ) ;
714- if ( customPolyglot . toSorted ( ) !== Config . customPolyglot . toSorted ( ) ) {
715- void UpdateConfig . setCustomPolyglot ( customPolyglot ) ;
716- }
717- } ,
696+ customPolyglotSelect = new SlimSelect ( {
697+ select : ".pageSettings .section[data-config-name='customPolyglot'] select" ,
698+ data : getLanguageDropdownData ( languageGroups ?? [ ] , ( language ) =>
699+ Config . customPolyglot . includes ( language )
700+ ) ,
701+ events : {
702+ afterChange : ( newVal ) : void => {
703+ const customPolyglot = newVal . map ( ( it ) => it . value ) ;
704+ if ( customPolyglot . toSorted ( ) !== Config . customPolyglot . toSorted ( ) ) {
705+ void UpdateConfig . setCustomPolyglot ( customPolyglot ) ;
706+ }
718707 } ,
719- } ) ;
720- }
708+ } ,
709+ } ) ;
721710
722711 $ ( ".pageSettings .section[data-config-name='tapeMargin'] input" ) . val (
723712 Config . tapeMargin
0 commit comments