{"id":13412382,"url":"https://github.com/darkreader/darkreader","last_synced_at":"2026-01-17T17:40:41.937Z","repository":{"id":23322054,"uuid":"26682105","full_name":"darkreader/darkreader","owner":"darkreader","description":"Dark Reader Chrome and Firefox extension","archived":false,"fork":false,"pushed_at":"2025-05-05T12:35:05.000Z","size":35247,"stargazers_count":20618,"open_issues_count":1327,"forks_count":2529,"subscribers_count":174,"default_branch":"main","last_synced_at":"2025-05-05T14:07:14.890Z","etag":null,"topics":["accessibility","chrome-extension","dark-mode","dark-theme","darkmode","eye-care","firefox-addon","night-mode","nightmode"],"latest_commit_sha":null,"homepage":"https://darkreader.org/","language":"TypeScript","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/darkreader.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"darkreader"}},"created_at":"2014-11-15T14:22:52.000Z","updated_at":"2025-05-05T13:35:47.000Z","dependencies_parsed_at":"2023-10-15T10:13:51.081Z","dependency_job_id":"280924f5-0bbc-4cc9-abc6-5ffef49fce98","html_url":"https://github.com/darkreader/darkreader","commit_stats":{"total_commits":8343,"total_committers":1511,"mean_commits":5.521508934480477,"dds":0.8210475848016301,"last_synced_commit":"915c9723c34b1061dee8d8b635176b0fb5b35b93"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkreader%2Fdarkreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkreader%2Fdarkreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkreader%2Fdarkreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkreader%2Fdarkreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkreader","download_url":"https://codeload.github.com/darkreader/darkreader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763956,"owners_count":21960484,"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":["accessibility","chrome-extension","dark-mode","dark-theme","darkmode","eye-care","firefox-addon","night-mode","nightmode"],"created_at":"2024-07-30T20:01:24.062Z","updated_at":"2026-01-17T17:40:41.911Z","avatar_url":"https://github.com/darkreader.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://darkreader.org\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg width=\"250\" alt=\"Dark Reader's mascot\" src=\"https://raw.githubusercontent.com/darkreader/darkreader.github.io/master/images/darkreader-mascot.svg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003eDark Reader \u003cstrong\u003eanalyzes\u003c/strong\u003e web pages and aims to \u003cstrong\u003ereduce eyestrain\u003c/strong\u003e while browsing the web.\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\u003ca rel=\"noreferrer noopener\" href=\"https://chromewebstore.google.com/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh\"\u003e\u003cimg alt=\"Chrome Web Store\" src=\"https://img.shields.io/badge/Chrome-141e24.svg?\u0026style=for-the-badge\u0026logo=google-chrome\u0026logoColor=white\"\u003e\u003c/a\u003e  \u003ca rel=\"noreferrer noopener\" href=\"https://addons.mozilla.org/firefox/addon/darkreader/\"\u003e\u003cimg alt=\"Firefox Add-ons\" src=\"https://img.shields.io/badge/Firefox-141e24.svg?\u0026style=for-the-badge\u0026logo=firefox-browser\u0026logoColor=white\"\u003e\u003c/a\u003e  \u003ca rel=\"noreferrer noopener\" href=\"https://darkreader.org/safari/\"\u003e\u003cimg alt=\"Apple App Store\" src=\"https://img.shields.io/badge/Safari-141e24.svg?\u0026style=for-the-badge\u0026logo=safari\u0026logoColor=white\"\u003e\u003c/a\u003e  \u003ca rel=\"noreferrer noopener\" href=\"https://microsoftedge.microsoft.com/addons/detail/dark-reader/ifoakfbpdcdoeenechcleahebpibofpc/\"\u003e\u003cimg alt=\"Edge Addons\" src=\"https://img.shields.io/badge/Edge-141e24.svg?\u0026style=for-the-badge\u0026logo=microsoft-edge\u0026logoColor=white\"\u003e\u003c/a\u003e  \u003ca el=\"noreferrer noopener\" href=\"https://addons.thunderbird.net/thunderbird/addon/darkreader\"\u003e\u003cimg alt=\"Thunderbird\" src=\"https://img.shields.io/badge/Thunderbird-141e24.svg?\u0026style=for-the-badge\u0026logo=thunderbird\u0026logoColor=white\"\u003e\u003c/a\u003e\n\n\u003ch2 align=\"center\"\u003eDark Reader\u003c/h2\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003eDark Reader is an \u003cstrong\u003eopen-source\u003c/strong\u003e MIT-licensed \u003cstrong\u003ebrowser extension\u003c/strong\u003e designed to analyze web pages. Dark Reader will generate a dark mode that aims to \u003cstrong\u003ereduce the eyestrain\u003c/strong\u003e of the user. Dark Reader is \u003cstrong\u003efeature-rich\u003c/strong\u003e and is customizable in many ways throughout the UI.\u003c/p\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Questions\n\nMost questions can be answered by reading the [help page](https://darkreader.org/help/).\nIf the help page doesn't answer your question, open up a new [discussion](https://github.com/darkreader/darkreader/discussions).\n\n## How to contribute\n\nRead more about contributing to Dark Reader in [CONTRIBUTING.md](https://github.com/darkreader/darkreader/blob/main/CONTRIBUTING.md).\n\n## Building for use\n\nDark Reader build script requires a JavaScript runtime, either NodeJS or Deno. We recommend using NodeJS, Deno support is experimental.\n\n### Building with NodeJS\n\nYou can install the extension from a file.\nInstall [Node.js](https://nodejs.org/) (we recommend LTS or higher, but any version at or above 15 will work). Download the source code (or check out from git).\nOpen the terminal in the root folder and run:\n\n- `npm install`\n- `npm run build` or `npm run build [-- flags]`\n\nThis will create a `build/release/darkreader-chrome.zip` file for use in a Chromium-based browser and a `build/release/darkreader-firefox.xpi` file for use in Firefox.\n\nYou can customize the build process by passing flags to build script. To see all flags, run `npm run build -- --help`.\n\n### Building with Deno\n\nYou can build Dark Reader with an alternative runtime called [Deno](https://deno.land/). For this run `deno:bootstrap` script (e.g., via `npm run deno:bootstrap` or manually copy the command from `package.json`). Then run the same commands described above.\n\nPlease note that if you encounter the error `Too many open files (os error 24)`, then you should use the newer version of Deno (preferably built from source or canary).\n\n### Bundling with official Firefox store signatures (experimental)\n\nBefore publication, extension stores provide digital signatures for extensions. These digital signatures certify the integrity of the archive (that the extension bundle did not get corrupted or bit-rotted) and that the extension store performed very basic extension validation.\n\nDark Reader repository contains these digital signatures and you can add them to the extension bundle. The following will build Dark Reader for Firefox version 4.9.63:\n```\nnpm run build -- --firefox --version=4.9.63\n```\n\nPlease note that only Firefox Add-ons store signatures are present in the repository right now. Also, due to NodeJS and TypeScript version compatibility, one might have to first check out the old revision (commit), then build the extension files, then check out the recent commit and create the bundle (by running only `signature` and `zip` steps).\n\n## Using Dark Reader on a website\n\nYou can use Dark Reader to enable dark mode on your website!\n\n- Install the package from NPM (`npm install darkreader`)\n- or build from the source code (`npm run api`)\n- or include the script via a CDN such as [unpkg](https://unpkg.com/darkreader/) or [jsDelivr](https://www.jsdelivr.com/package/npm/darkreader)\n\nThen you can use the following code to control Dark Reader's API:\n```javascript\nDarkReader.enable({\n    brightness: 100,\n    contrast: 90,\n    sepia: 10\n});\n\nDarkReader.disable();\n\n// Enable when the system color scheme is dark.\nDarkReader.auto({\n    brightness: 100,\n    contrast: 90,\n    sepia: 10\n});\n\n// Stop watching for the system color scheme.\nDarkReader.auto(false);\n\n// Get the generated CSS of Dark Reader returned as a string.\nconst CSS = await DarkReader.exportGeneratedCSS();\n\n// Check if Dark Reader is enabled.\nconst isEnabled = DarkReader.isEnabled();\n```\n\n... or if you are using ES modules:\n\n```javascript\nimport {\n    enable as enableDarkMode,\n    disable as disableDarkMode,\n    auto as followSystemColorScheme,\n    exportGeneratedCSS as collectCSS,\n    isEnabled as isDarkReaderEnabled\n} from 'darkreader';\n\nenableDarkMode({\n    brightness: 100,\n    contrast: 90,\n    sepia: 10,\n});\n\ndisableDarkMode();\n\nfollowSystemColorScheme();\n\nconst CSS = await collectCSS();\n\nconst isEnabled = isDarkReaderEnabled();\n```\n\nBe aware that Dark Reader will add the `chrome` object onto the `window` object. These are to stub certain functions that the code will use. They originate from the webextension-api.\n\n## Site fixes\n\nAutomatically syncing the site fixes for every Dark Reader user was disabled because the GitHub team does not allow using GitHub as a content delivery network (CDN). The storage of these files would be expensive, and making requests to other resources would look suspicious. Each new release of Dark Reader will include the new changes.\n\nHowever, this can be manually enabled with the following steps:\n\n1. Click on the Dark Reader extension icon.\n2. Click on the `Dev tools` button (in the bottom-right corner).\n3. Go to `Advanced` and click on the `Preview new design` button.\n4. Close the developer tools window and click on the Dark Reader extension icon again.\n5. Go to `Settings` -\u003e `Advanced` and enable the `Synchronize sites fixes` setting.\n\nTo force a synchronization of the sites fixes (when the corresponding setting is enabled), perform the following steps:\n\n1. Click on the Dark Reader extension icon.\n2. Go to `Settings` -\u003e `Advanced` -\u003e `Dev tools`.\n3. For each \"Editor\" section, click on `Reset changes`, confirm with `OK`, and then click on `Apply`. Afterwards, close the developer tools window and reload the desired page(s).\n\n## Enable Dark Reader on restricted pages on Mozilla Firefox\n\nBy default, Dark Reader does not work on some websites due to **security restrictions** enforced by Mozilla.\n\nThe following instructions will guide you on how to disable those restrictions.\n\n**Proceed with caution. This exposes you to a security risk if you do not know what you are doing.**\n\n**Be sure that you do not have any suspicious or malicious-looking extension installed before proceeding.**\n\n**These settings will apply to all extensions, and not just Dark Reader.**\n\nStep 1: change Dark Reader's settings.\n\n1. Click on the Dark Reader extension icon.\n2. Click on the `Dev tools` button (in the bottom-right corner).\n3. Go to `Advanced` and click on the `Preview new design` button.\n4. Close the developer tools window and click on the Dark Reader extension icon again.\n5. Go to `Settings` -\u003e `Advanced` and enable the `Enable on restricted pages` setting.\n\nStep 2: change Firefox's settings.\n\n- Type `about:config` in the address bar and press Enter.\n  - A warning page may appear. Click `Accept the Risk and Continue` to proceed.\n- Search for and set `extensions.webextensions.restrictedDomains` to an empty value (if the preference does not exist, create it with `String` as the type).\n- Set `privacy.resistFingerprinting.block_mozAddonManager` to `true` (if the preference does not exist, create it with `Boolean` as the type).\n\nAfter changing the necessary settings for both Dark Reader and Firefox, reload the desired page(s).\n\n**If you had previously changed any of the following preferences, please reset them to their default values as they are only related to security and are not necessary for Dark Reader to work on restricted websites.**\nTo reset them, click on the reset (or delete icon, if present) icon at the most-right corner of the preference line in `about:config`.\n- `extensions.webextensions.addons-restricted-domains@mozilla.com.disabled`\n- `extensions.quarantinedDomains.enabled`\n- `extensions.quarantinedDomains.list`\n\n### Clarification about quarantined domains (\"Run on sites with restrictions\" option)\n\u003cdetails\u003e\u003csummary\u003eQuarantined domains and Dark Reader — an explanation\u003c/summary\u003e\n\nThe option \"Run on sites with restrictions\", present for some extensions, is only related to quarantined domains and is not needed for Dark Reader to work on restricted websites. In the context of Firefox's source code, \"restricted domains\" and \"quarantined domains\" are two separate things.\n\n**The \"restricted domains\" list** (controlled by the preference `extensions.webextensions.restrictedDomains`) is the same for all users. It will restrict *all* user-installed extensions (without exceptions) from running on the specified websites. The list is controlled by Mozilla, and, as of December 2024, the list only contains Mozilla-owned domains. Sites that are not on that list will not be affected by those restrictions (meaning that the extensions will be able to run normally).\n\n**The \"quarantined domains\" list** (controlled by the preferences `extensions.quarantinedDomains.enabled` and `extensions.quarantinedDomains.list`) contains domains that will run extensions normally, but if Firefox detects suspicious activity from a particular extension it will block that extension on those specific websites. The list is controlled by Mozilla, and, as of December 2024, the list only contains domains related to Internet banking in Brazil. For more information about quarantined domains, see \"[Why are some add-ons not allowed on sites restricted by Mozilla?](https://support.mozilla.org/en-US/kb/quarantined-domains)\".\n\nFor Dark Reader, the option \"Run on sites with restrictions\" is not shown because Dark Reader is a [Recommended](https://support.mozilla.org/en-US/kb/recommended-extensions-program) extension by Mozilla. (The \"Recommended\" status is only relevant for \"quarantined domains\", and does not affect \"restricted domains\".)\n\nThe fact that it is a Recommended extension means that it meets the \"highest standards of security, functionality, and user experience\". The quarantined domains are only related to extension security. Because Dark Reader is considered secure by Mozilla, that option is not shown, meaning **it will always run even on quarantined domains** (but will still obey the \"restricted domains\" list if it is not empty).\n\nRegarding quarantined domains specifically, there is this [comment from Firefox's source code](https://searchfox.org/mozilla-central/rev/1838f847aa3bf909c3d34a94a8f0cd7e37fca086/toolkit/components/extensions/Extension.sys.mjs#3470-3471):\n\n```\n// Privileged extensions and any extensions with a recommendation state are\n// exempt from the quarantined domains.\n```\n\nA simple way to recapitulate all this information is: \"restricted domains\" exist to protect Mozilla-owned sites (no user-installed extension will run on them, without exceptions), while \"quarantined domains\" are meant to protect users from malicious extensions (and it doesn't apply to Dark Reader because it is a Recommended extension).\n\n\u003c/details\u003e\n\n\u003ch2 align=\"center\"\u003eContributors\u003c/h2\u003e\n\u003cbr/\u003e\n\u003ch3 align=\"center\"\u003e\u003cstrong\u003eThank you to all our contributors! Dark Reader exists thanks to you.\u003c/strong\u003e\u003c/h3\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\u003ca rel=\"noreferrer noopener\" href=\"https://github.com/darkreader/darkreader/graphs/contributors/\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/contributors.svg?width=890\u0026button=false\"/\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eBackers\u003c/h2\u003e\n\u003cbr/\u003e\n\u003ch3 align=\"center\"\u003e\u003cstrong\u003eThank you to all our generous backers! \u003c/strong\u003eSupport Dark Reader by \u003ca rel=\"noreferrer noopener\" href=\"https://opencollective.com/darkreader\" target=\"_blank\"\u003ebecoming a backer\u003c/a\u003e.\u003c/h3\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\u003ca rel=\"noreferrer noopener\" href=\"https://opencollective.com/darkreader#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/backers.svg?width=890\u0026limit=1000\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eSponsors\u003c/h2\u003e\n\u003cp\u003eDoes your company use Dark Reader? Please ask your manager or the marketing team if your company would be interested in supporting our project. Your support will allow the maintainers to dedicate more time to maintenance and creating new features for everyone. Also, your company's logo will show on \u003ca rel=\"noreferrer noopener\" href=\"https://github.com/darkreader/darkreader#sponsors\" target=\"_blank\"\u003eGitHub\u003c/a\u003e. Who doesn't want a little extra exposure? \u003ca rel=\"noreferrer noopener\" href=\"https://opencollective.com/darkreader\" target=\"_blank\"\u003eHere's the info\u003c/a\u003e.\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\u003cstrong\u003eThank you to all our wonderful sponsors!\u003c/strong\u003e\u003c/h3\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/0/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/1/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/2/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/3/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/4/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/5/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/6/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/7/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/8/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/9/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/darkreader/sponsor/10/website\" target=\"_blank\" rel=\"noreferrer noopener\"\u003e\u003cimg src=\"https://opencollective.com/darkreader/sponsor/10/avatar.svg\"\u003e\u003c/a\u003e\n","funding_links":["https://opencollective.com/darkreader"],"categories":["TypeScript","chrome-extension","Weapons","General","Browser Extensions","前端开发框架及项目","Repository app","Table of Contents"],"sub_categories":["Browser Addons","其他_文本生成、文本对话","Browser Extensions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkreader%2Fdarkreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkreader%2Fdarkreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkreader%2Fdarkreader/lists"}