You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser.
XenForo Dark / Light Mode Automatic Toggle Switch / jsdmat
0.4.0
Register & Get access to index
- Added capability to react and incorporate user-driven style changes including lock and release scenarios.
- Added call method to accept user-driven toggle requests ("light to dark" and vice versa).
- Rebuilt mandatory template modification sheet (PAGE_CONTAINER) to comply to new jsdmat object structure.
- Added recommended template modification sheet (style_chooser) to be able to capture user-driven style changes.
- Added optional public navigation entry example to offer a user-driven light-to-dark toggle switch.
- Added check for page visibility to minimize race conditions and optimize behaviour when using multiple tabs.
- New jsdmat object structure, no other global variables needed anymore.
- Added ability to deal with inconsistent / older versions' local storage data.
- Changed local storage parameters, new: lockId, lastLightId, lastDarkId, lastSystemId; discarded: lastId.
Task list for updating previous versions:
- Replace both jsdmat.js and jsdmat.min.js files.
- Replace (mandatory) template modification for (PAGE_CONTAINER) in all affected parent styles.
- Check if you re-entered your style_id combinations correctly in (PAGE_CONTAINER).
- Add (recommended) template modification for (style_chooser) in all affected parent styles.
- Add (optionally) public navigation entry for light-to-dark toggle switch according example.
- Strict rename of last entries of "JSdarkmodeAutoToggle" to "jsdmat", "jsdmat" now is used consequently.
- Resource URL added into CHANGELOG.txt.