diff --git a/src/gui/theming.js b/src/gui/theming.js index ac274203c91faaa2fae39e7ccfda123e353874bb..fa248354326bc71eddf2f0a0d2772d932c91887a 100644 --- a/src/gui/theming.js +++ b/src/gui/theming.js @@ -5,6 +5,13 @@ App.UI.Theme = (function() { let currentThemeElement = null; let devTheme = null; + // reload theme on page reload + $(document).on(":passagestart", () => { + if (currentThemeElement === null && V.theme !== 0) { + load(V.theme); + } + }); + return { selector: selector, devTheme: reloadDevTheme, diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index 27e7fb9e3087d70ac6ec527d5cab874d33b25446..b6437eac4e9edb96236a76072464eebf7247d5fc 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -1057,7 +1057,7 @@ This save was created using FC version $ver build $releaseID. </div> <p> - UI theme selector. Allows to select a single CSS file to be loaded. <span class="red">The file has to be located in the same directory as the HTML file otherwise it will simply not load at all.</span> <span class="yellow">Themes do not persist through page reloads.</span> + UI theme selector. Allows to select a single CSS file to be loaded. <span class="red">The file has to be located in the same directory as the HTML file otherwise it will simply not load at all.</span> <<print App.UI.DOM.includeDOM(App.UI.Theme.selector(), "themeSelector")>> </p>