2.1.0 • Published 1 year ago

dark-mode-screenshot v2.1.0

Weekly downloads
8
License
Apache-2.0
Repository
github
Last release
1 year ago

Dark Mode Screenshot 📷🌒

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

👩‍💻 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

2.1.0

1 year ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago