Skip to content

Commit c062f4f

Browse files
committed
Fix #437
1 parent 476f122 commit c062f4f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

plugins/themeSwitch/themeSwitch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ui:
77
requires:
88
- CommunityScriptsUILibrary
99
javascript:
10-
- themeSwitchMain.js
1110
- themeSwitchCSS.js
11+
- themeSwitchMain.js
1212
css:
1313
- themeSwtichDefault.css
1414
assets:

plugins/themeSwitch/themeSwitchMain.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
(async () => {
2-
while (!window.stash) {
2+
while (!window.csLib) {
33
await new Promise((resolve) => setTimeout(resolve, 100));
44
}
55

6+
function waitForElementClass(selector, callback) {
7+
csLib.waitForElement(`.${selector}`, callback);
8+
}
9+
610
const svgChevDN =
711
'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-down" class="svg-inline--fa fa-chevron-down fa-icon collapse-icon fa-fw" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"></path></svg>';
812
const svgChevUP =

0 commit comments

Comments
 (0)