File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,21 +70,24 @@ class Plugin {
7070 }
7171
7272 addDropDown ( ) {
73- const list = document . querySelector ( '.extended-list-buttons' ) ;
74- if ( list ) {
75- const box = document . createElement ( 'div' ) ;
76- box . className = 'select-language-box' ;
77- const select = document . createElement ( 'select' ) ;
78- select . className = 'select-language-dropdown' ;
79- this . supportLanguages . forEach ( ( { value, text } ) => {
80- const option = document . createElement ( 'option' ) ;
81- option . value = value ;
82- option . textContent = text ;
83- select . append ( option ) ;
84- } ) ;
85- box . append ( select ) ;
86- list . append ( box ) ;
87- }
73+ const list = document . querySelectorAll ( '.extended-list-buttons' ) ;
74+ list . forEach ( ( item ) => {
75+ const input = item . querySelector ( 'input[data-name="language"]' ) ;
76+ if ( input ) {
77+ const box = document . createElement ( 'div' ) ;
78+ box . className = 'select-language-box' ;
79+ const select = document . createElement ( 'select' ) ;
80+ select . className = 'select-language-dropdown' ;
81+ this . supportLanguages . forEach ( ( { value, text } ) => {
82+ const option = document . createElement ( 'option' ) ;
83+ option . value = value ;
84+ option . textContent = text ;
85+ select . append ( option ) ;
86+ } ) ;
87+ box . append ( select ) ;
88+ item . append ( box ) ;
89+ }
90+ } )
8891 }
8992
9093 changeEvent ( ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " language" ,
3- "version" : " 1.0.7 " ,
3+ "version" : " 1.0.8 " ,
44 "description" : {
55 "zh_tw" : " TREM-Lite Language Plugin"
66 },
You can’t perform that action at this time.
0 commit comments