|
123 | 123 | sidebar.appendChild(div); |
124 | 124 | } |
125 | 125 | } |
126 | | - var themeChoices = document.getElementById("theme-choices"); |
127 | | - if (themeChoices) { |
128 | | - if (!themesWidth) { |
129 | | - var savedState = themeChoices.style.display; |
130 | | - themeChoices.style.display = 'block'; |
131 | | - themesWidth = themeChoices.offsetWidth + 'px'; |
132 | | - themeChoices.style.display = savedState; |
133 | | - } |
134 | | - themeChoices.style.position = "fixed"; |
135 | | - themeChoices.style.width = themesWidth; |
136 | | - themeChoices.style.top = '78px'; |
137 | | - themeChoices.style.left = '250px'; |
138 | | - } |
139 | | - document.getElementsByTagName("body")[0].style.marginTop = '45px'; |
140 | | - var themePicker = document.getElementById("theme-picker"); |
141 | | - if (themePicker) { |
142 | | - themePicker.style.position = "fixed"; |
143 | | - themePicker.style.top = "50px"; |
144 | | - themePicker.style.left = "250px"; |
| 126 | + var themePicker = document.getElementsByClassName("theme-picker"); |
| 127 | + if (themePicker && themePicker.length > 0) { |
| 128 | + themePicker[0].style.display = "none"; |
145 | 129 | } |
146 | 130 | } |
147 | 131 |
|
|
157 | 141 | filler.remove(); |
158 | 142 | } |
159 | 143 | document.getElementsByTagName("body")[0].style.marginTop = ''; |
160 | | - var themePicker = document.getElementById("theme-picker"); |
161 | | - if (themePicker) { |
162 | | - themePicker.style.position = "absolute"; |
163 | | - themePicker.style.top = null; |
164 | | - themePicker.style.left = null; |
165 | | - } |
166 | | - var themeChoices = document.getElementById("theme-choices"); |
167 | | - if (themeChoices) { |
168 | | - themeChoices.style.position = 'absolute'; |
169 | | - themeChoices.style.width = null; |
170 | | - themeChoices.style.top = null; |
171 | | - themeChoices.style.left = null; |
| 144 | + var themePicker = document.getElementsByClassName("theme-picker"); |
| 145 | + if (themePicker && themePicker.length > 0) { |
| 146 | + themePicker[0].style.display = null; |
172 | 147 | } |
173 | 148 | } |
174 | 149 |
|
|
0 commit comments