{"id":28348623,"url":"https://github.com/robsd/js-toggle-dark-mode","last_synced_at":"2026-05-01T00:31:40.023Z","repository":{"id":148508330,"uuid":"419525436","full_name":"robsd/js-toggle-dark-mode","owner":"robsd","description":"A smart JavaScript application that automatically inherits the user's prefers-color-scheme, but allows it to be overridden by the user and stored in the user's browser storage to enable site-wide preference and future visits.","archived":false,"fork":false,"pushed_at":"2023-04-03T21:56:24.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T05:37:19.128Z","etag":null,"topics":["bootstrap","bootstrap5","dark","dark-mode","dark-mode-toggle","dark-mode-toggler","dark-theme","html","html5","javascript","js","mode","snippet","theme","toggle","toggle-dark-mode","toggler","web"],"latest_commit_sha":null,"homepage":"https://robsd.github.io/js-toggle-dark-mode","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robsd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-21T00:03:28.000Z","updated_at":"2024-03-05T02:27:09.000Z","dependencies_parsed_at":"2023-04-25T04:03:28.141Z","dependency_job_id":null,"html_url":"https://github.com/robsd/js-toggle-dark-mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/robsd/js-toggle-dark-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsd%2Fjs-toggle-dark-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsd%2Fjs-toggle-dark-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsd%2Fjs-toggle-dark-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsd%2Fjs-toggle-dark-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robsd","download_url":"https://codeload.github.com/robsd/js-toggle-dark-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsd%2Fjs-toggle-dark-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32481553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap5","dark","dark-mode","dark-mode-toggle","dark-mode-toggler","dark-theme","html","html5","javascript","js","mode","snippet","theme","toggle","toggle-dark-mode","toggler","web"],"created_at":"2025-05-27T18:41:13.552Z","updated_at":"2026-05-01T00:31:40.005Z","avatar_url":"https://github.com/robsd.png","language":"JavaScript","funding_links":["https://ko-fi.com/F1F34TIDQ"],"categories":[],"sub_categories":[],"readme":"# js-toggle-dark-mode 🌙\n\nA smart JavaScript application that automatically inherits the user's prefers-color-scheme, but allows it to be overridden by the user and stored in the user's browser storage to enable site-wide preference and future visits.\n\n## Installing on your own site\n\n1. Copy the 3 `\u003clink rel=\"stylesheet\"...` declarations from the top of **index.html** (the first two Bootstrap and Font Awesome are really only for styling the toggle button so that's up to you).\n2. Copy the `\u003cdiv id=\"theme-toggler\"\u003e...` line which will display the toggle button if functionality is supported by the user's browser.\n3. Copy the `\u003cscript src...`  declaration from the bottom of **index.html**.\n4. Copy the **js** and **css** folders.\n5. Edit the **css/light-theme.css** with all your light theme styles and **css/dark-theme.css** with all your dark theme styles.\n\n## Demo\n\nhttps://robsd.github.io/js-toggle-dark-mode\n\n## Support my work\n\nIf you like this repo or used any of the code, please star ⭐ it and consider supporting me below...\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F34TIDQ)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobsd%2Fjs-toggle-dark-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobsd%2Fjs-toggle-dark-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobsd%2Fjs-toggle-dark-mode/lists"}