diff options
| author | Lizzy Hunt <lizzy.hunt@usu.edu> | 2024-03-26 16:00:05 -0600 |
|---|---|---|
| committer | Lizzy Hunt <lizzy.hunt@usu.edu> | 2024-03-26 16:00:05 -0600 |
| commit | fe22956d5dbdeb2b80a9e56b46abe2be9f2bfcdb (patch) | |
| tree | 6111f03c2da4eb42aff03cda72157a8961da27e8 /static/js/util | |
| parent | 27aab70386c68f3a0f22c52e72b91cf16b289100 (diff) | |
| download | hatecomputers.club-fe22956d5dbdeb2b80a9e56b46abe2be9f2bfcdb.tar.gz hatecomputers.club-fe22956d5dbdeb2b80a9e56b46abe2be9f2bfcdb.zip | |
initial commit
Diffstat (limited to 'static/js/util')
| -rw-r--r-- | static/js/util/setThemeBeforeRender.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/static/js/util/setThemeBeforeRender.js b/static/js/util/setThemeBeforeRender.js new file mode 100644 index 0000000..d826193 --- /dev/null +++ b/static/js/util/setThemeBeforeRender.js @@ -0,0 +1,6 @@ +// sets theme before rendering & jquery loaded to prevent flashing of uninitialized theme +// (ugly white background) +document.documentElement.setAttribute( + "data-theme", + localStorage.getItem("theme"), +); |
