npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

no-darkreader

v1.0.3

Published

A plugin to block the Darkreader extension from working on your already dark website!

Readme

Installation

You could copy the latest minified version from nodarkreader.min.js, also it's available via npm:

npm install no-darkreader

Usage

You only need to setup your index.html file as shown bellow, then it should work properly:

...
<head>
  ...
  <meta name="darkreader" content="NO-DARKREADER-PLUGIN" />
  ...
</head>
...
<script src="./path/to/nodarkreader.min.js"></script>
...

Or if it was installed via npm, you could add this metatag to your index.html:

<meta name="darkreader" content="NO-DARKREADER-PLUGIN" />

also don't forget to import the plugin within your app's entrypoint (e.g. index.js or App.js ):

import 'no-darkreader'

Contributing

note: please run ./minify.sh before submitting any PR!

Pull requests are welcome! For larger changes, especially structural ones, please open an issue first to discuss what you would like to change.

If you have a feature request, feel free to open an issue!

FAQ

How does it work?

Starting from DarkReader/src/inject/dynamic-theme/index.ts file:

function isAnotherDarkReaderInstanceActive() {
    const meta: HTMLMetaElement = document.querySelector('meta[name="darkreader"]');
    if (meta) {
        if (meta.content !== INSTANCE_ID) {
            return true;
        }
        return false;
    }
    createDarkReaderInstanceMarker();
    return false;
}

no-darkreader tricks this function by injecting a fake metatag named darkreader which prevents DarkReader from wokring, also it inverse every css/html modification DarkReader does.

What happends if I didn't use <meta name="darkreader" content="NO-DARKREADER-PLUGIN" />?

You may encounter this infinite-loop which causes a performance issue:

1- DarkReader injects a metatag with its instance ID (DarkReader may work before no-darkreader plugin):

// SOURCE: https://github.com/darkreader/darkreader/blob/a08d923f43aaf8b96293491fe0c649c9e0c1edc2/src/inject/dynamic-theme/index.ts
function createDarkReaderInstanceMarker() {
    const metaElement: HTMLMetaElement = document.createElement('meta');
    metaElement.name = 'darkreader';
    metaElement.content = INSTANCE_ID;
    document.head.appendChild(metaElement);
}
function isAnotherDarkReaderInstanceActive() {
    const meta: HTMLMetaElement = document.querySelector('meta[name="darkreader"]');
    if (meta) {
        if (meta.content !== INSTANCE_ID) {
            return true;
        }
        return false;
    }
    createDarkReaderInstanceMarker();  // added if there's no metatag named `darkreader`.
    return false;
}

2- no-darkreader removes DarkReader metatag in order to inject a fake one.

3- DarkReader reinjects a metatag before no-darkreader injecting a fake one.

4- goto step 2.

Credits

Thanks to Kainoa Kanter (@ThatOneCalculator) for the awesome logo.

License

This project is licensed under an MIT license.