Socket
Socket
Sign inDemoInstall

darkmode-js

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darkmode-js

🌓 Add darkmode / nightmode to your website in a few seconds


Version published
Weekly downloads
800
decreased by-32.94%
Maintainers
1
Weekly downloads
 
Created
Source

Logo

Darkmode.js GitHub

🌓 Add darkmode / nightmode to your website in a few seconds

Demo

Check out the demo in these websites:

  • (coming soon)

How to use

Darkmode.js is very easy to use, just copy paste the following code or use the npm package.

Important

Your background (even white) needs to be in another tag than body.

Easy way (using the JSDelivr CDN)

Just add this code to your html page:

<script src="https://cdn.jsdelivr.net/npm/darkmode/lib/darkmode.min.js"></script>
<script>
  new Darkmode().showWidget();
</script>

Using NPM

npm install darkmode

Then add the following javascript code:

import Darkmode from 'darkmode';

new Darkmode().showWidget();

Programmatically (without the widget)

(coming soon)

Options

Here are the option availables:

var options = {
}

const darkmode = Darkmode(options);
darkmode.showWidget();

Development

  • yarn build or npm run build - produces production version of your library under the lib folder
  • yarn dev or npm run dev - produces development version of your library and runs a watcher
  • yarn test or npm run test - it runs the tests :)
  • yarn test:watch or npm run test:watch - same as above but in a watch mode

Buy me a beer 🍺

If you like this project, feel free to donate:

  • Paypal: https://www.paypal.me/kanbanote
  • Bitcoin: 19JiNZ1LkMaz57tewqJaTg2hQWH4RgW4Yp
  • Ethereum: 0xded81fa4624e05339924355fe3504ba9587d5419
  • Monero: 43jqzMquW2q989UKSrB2YbeffhmJhbYb2Yxu289bv7pLRh4xVgMKj5yTd52iL6x1dvCYs9ERg5biHYxMjGkpSTs6S2jMyJn
  • Motive: MOTIV-25T5-SD65-V7LJ-BBWRD (Get Motive Now: https://motive.network)

Keywords

FAQs

Package last updated on 13 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc