{"id":15489582,"url":"https://github.com/pablopunk/dark-mode-code","last_synced_at":"2025-04-22T18:24:32.409Z","repository":{"id":64254964,"uuid":"276678117","full_name":"pablopunk/dark-mode-code","owner":"pablopunk","description":"Automagically use dark mode detection on your website","archived":false,"fork":false,"pushed_at":"2023-01-07T20:53:21.000Z","size":3,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T17:35:56.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pablopunk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-02T15:11:45.000Z","updated_at":"2023-03-19T22:28:55.000Z","dependencies_parsed_at":"2023-01-15T07:00:53.512Z","dependency_job_id":null,"html_url":"https://github.com/pablopunk/dark-mode-code","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fdark-mode-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fdark-mode-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fdark-mode-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablopunk%2Fdark-mode-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablopunk","download_url":"https://codeload.github.com/pablopunk/dark-mode-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296530,"owners_count":21407037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-02T07:06:32.381Z","updated_at":"2025-04-22T18:24:32.361Z","avatar_url":"https://github.com/pablopunk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dark-mode-code\n\nExample in react:\n\n```js\nconst darkModeCode = require('dark-mode-code')\n\n//...\n  \u003cscript dangerouslySetInnerHTML={{ __html: darkModeCode }} /\u003e\n//...\n```\n\n## Features\n\n* Automatically set `\u003cbody class=\"dark\"\u003e` if the client OS is in dark mode.\n* Automatically update the former class when the client changes the mode when using the website.\n* Expose a method to manually toggle the theme: `window.__toggleDarkMode()`\n\n\n\n## Author\n\n| ![me](https://gravatar.com/avatar/fa50aeff0ddd6e63273a068b04353d9d?size=100) |\n| ---------------------------------------------------------------------------- |\n| [Pablo Varela](https://pablo.pìnk)                                           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fdark-mode-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablopunk%2Fdark-mode-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablopunk%2Fdark-mode-code/lists"}