PluginProbe
404 Solution / 4.1.13
404 Solution v4.1.13
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / html / themeSetterScript.html

themeSetterScript.html in 404 Solution 4.1.13, at includes/html/themeSetterScript.html

20 lines 685 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <script type="text/javascript">
2 (function() {
3 // Apply theme synchronously to html element to prevent FOUC
4 // This runs immediately when the script executes in <head>, before body is parsed
5 document.documentElement.setAttribute("data-theme", "{theme}");
6
7 // Also apply to body for redundancy (ensures both html and body have the attribute)
8 if (document.body) {
9 document.body.setAttribute("data-theme", "{theme}");
10 } else {
11 // If body not available yet, set it when DOM is ready
12 document.addEventListener("DOMContentLoaded", function() {
13 if (document.body) {
14 document.body.setAttribute("data-theme", "{theme}");
15 }
16 });
17 }
18 })();
19 </script>
20