| title | dark-mode.js |
|---|---|
| permalink | /dark-mode.md |
Usage:
<!DOCTYPE html>
<html lang="en">
<head>...</head>
<body>
...
<!-- If the script is hosted by jsDelivr, use this block and configure as you wish. All data attributes are optional. -->
<script src="https://cdn.jsdelivr.net/gh/wackyblackie/js-scripts/dark-mode.js" integrity="sha384-3b8SIRlT1HBapUpup4klnc5iWHf4r2HxQAGC4WJbf4NprzOUvbYE1X5/IZcnlyYV" crossorigin="anonymous" data-bg-color="<color>" data-text-color="<color>" data-link-color="<color>" data-on-time="<hour, 24hr format>" data-off-time="<hour, 24hr format>"></script>
<!-- If the script is self-hosted, use this block and configure as you wish. All data attributes are optional, except the data-source. If data-source is left out, or is not set to "wackyblackie/js-scripts/dark-mode.js" the script will not function. -->
<script src="dark-mode.js" data-source="wackyblackie/js-scripts/dark-mode.js" crossorigin="anonymous" data-bg-color="<color>" data-text-color="<color>" data-link-color="<color>" data-on-time="<hour, 24hr format>" data-off-time="<hour, 24hr format>"></script>
</body>
</html>Production ready!