Dark / Light Mode Automatic Toggle Switch / jsdmat

xF2 Template Modification Dark / Light Mode Automatic Toggle Switch / jsdmat 0.4.0

No permission to download
Q: Will jsdmat work with {XYZ}?
A: There is no known dependency on other addons or styles besides the need of 2 enabled styles in minimum. Calling any style is done with XenForo built-in mechanisms, so as long as the native XenForo style environment is able to accept a style change by URI /misc/style?style_id=2&..., jsdmat can do the same.

Q: Does jsdmat use cookies?
A: No, it relies on a local storage dataset. A good explanation can be found here: Cookie purposes

Q: Why do redirects land at top of page and do not jump back to post {XY} far, far down the page?
A: Afaik it seems not every browser (engine) is willing to deliver the anchor component of an URI to JS and/or to keep it up and alive during redirect calls. Known: Webkit/iOS unfortunately messed up keeping anchors during tests.

Q: Is there a way to use jsdmat without uploading files?
A: Yes, you can replace the conditional <xf:if is="$xf.fullJs">(...)</xf:if> at the bottom of invocation code with a direct embed: <script> content of file jsdmat.min.js </script>.
Be aware: You miss the opportunity to get the JS file cached at CDN / client side as designed by XenForo: Direct embed dumps additional 1.4 kB load to every single page delivery!

Q: jsdmat drives me mad during dev works, can I disable it just for me without code modifications?
A: Yes, please check the browser's local storage entries for {prefix}jsdmat and change the first entry "disable" from false to true.