Skip to content

Commit 62ea3c6

Browse files
notbentehluketannerDogmaDragon
authored
Fix #437 (Theme Switcher Plugin) (#511)
* Fix #437 * Bump version --------- Co-authored-by: Luke Tanner <[email protected]> Co-authored-by: DogmaDragon <[email protected]>
1 parent 476f122 commit 62ea3c6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

plugins/themeSwitch/themeSwitch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Theme Switch
22
description: Theme and CSS script manager located in main menu bar top right.
33
# requires: CommunityScriptsUILibrary
44
url: https://github.com/stashapp/CommunityScripts/tree/main/plugins/themeSwitch
5-
version: 2.1
5+
version: 2.1.1
66
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)