Skip to content

Commit

Permalink
Update take-snapshot.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
warmachine028 authored Sep 15, 2024
1 parent 704526d commit 567eb79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/take-snapshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ const takeSnapShot = async () => {
const page = await browser.newPage()
await page.setViewport({ width: 1920, height: 1080 })
await page.goto(url)
await sleep(3000)
await page.screenshot({ path: '.github/preview.png' })
await page.emulateMediaFeatures([{ name: "prefers-color-scheme", value: "light" }]);
await page.screenshot({ path: '.github/preview-light.png' })
await page.emulateMediaFeatures([{ name: "prefers-color-scheme", value: "dark" }]);
await page.screenshot({ path: '.github/preview-dark.png' })
await browser.close()
}

Expand Down

0 comments on commit 567eb79

Please sign in to comment.