Fix #437 (Theme Switcher Plugin) (#511)

* Fix #437

* Bump version

---------

Co-authored-by: Luke Tanner <luke.c.tanner@gmail.com>
Co-authored-by: DogmaDragon <103123951+DogmaDragon@users.noreply.github.com>
This commit is contained in:
notbenteh
2025-03-14 18:24:12 +11:00
committed by GitHub
parent 476f122850
commit 62ea3c625f
2 changed files with 7 additions and 3 deletions

View File

@@ -2,13 +2,13 @@ name: Theme Switch
description: Theme and CSS script manager located in main menu bar top right.
# requires: CommunityScriptsUILibrary
url: https://github.com/stashapp/CommunityScripts/tree/main/plugins/themeSwitch
version: 2.1
version: 2.1.1
ui:
requires:
- CommunityScriptsUILibrary
javascript:
- themeSwitchMain.js
- themeSwitchCSS.js
- themeSwitchMain.js
css:
- themeSwtichDefault.css
assets:

View File

@@ -1,8 +1,12 @@
(async () => {
while (!window.stash) {
while (!window.csLib) {
await new Promise((resolve) => setTimeout(resolve, 100));
}
function waitForElementClass(selector, callback) {
csLib.waitForElement(`.${selector}`, callback);
}
const svgChevDN =
'<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>';
const svgChevUP =