I have a JavaScript code in my header that switches between normal mode and custom dark mode using an embedded variable from the backend. The code works perfectly when I place the JS in the header and the CSS in the custom CSS section.
However, when I try to add the same JS and CSS code in the Theme tab with a template, it doesn’t work as expected. I'm unsure what the issue is, but it seems that the embedded data isn't being properly incorporated into the addOnLoad
code that I added. Any help would be appreciated!