Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dark-mode-screenshot

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dark-mode-screenshot

This Puppeteer script takes a screenshot of a webpage in Light and Dark Mode.

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dark Mode Screenshot 📷🌒

This Puppeteer script takes a screenshot of a webpage in Light and Dark Mode.

Dark ModeLight Mode
screenshot-dark.png screenshot-light.png

👩‍💻 Usage

Locally from the command line:

$ node dark-mode-screenshot.js --url https://googlechromelabs.github.io/dark-mode-toggle/demo/ --output screenshot --fullPage --pause 750

Without installing remotely from npm:

$ npx dark-mode-screenshot --url https://googlechromelabs.github.io/dark-mode-toggle/demo/ --output screenshot --fullPage --pause 750
Parameter (long)Parameter (short)Description
--url-uThe URL of the webpage, defaults to https://googlechromelabs.github.io/dark-mode-toggle/ demo/index.html.
--output-oThe file prefix of the screenshot (there will be a light and a dark file), defaults to screenshot.
--fullPage-fWhether or not to take a full page screenshot, defaults to true.
--pause-pTime in milliseconds to pause before taking each screenshot, defaults to 0.

Acknowledgements

Thanks to @mathiasbynens for implementing page.emulateMediaFeatures(features) in Puppeteer and for making this script a lot lighter.

📄 License

Apache 2.0

Keywords

FAQs

Package last updated on 27 Feb 2023

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