Skip to content

Commit a3ae631

Browse files
committed
build: only use dark/light
1 parent 3a31dfa commit a3ae631

File tree

6 files changed

+3
-3
lines changed

6 files changed

+3
-3
lines changed

packages/examples/src/screenshot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require('./main')(async url => {
88
const buffer = await browserless.screenshot(url.toString(), {
99
hideElements: ['.crisp-client', '#cookies-policy'],
1010
overlay: {
11-
browser: 'safari-dark',
11+
browser: 'dark',
1212
color: '#6791B6'
1313
}
1414
})
-20.4 KB
Binary file not shown.
-20.3 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.

packages/screenshot/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const hexRgb = require('hex-rgb')
66
const sharp = require('sharp')
77
const path = require('path')
88

9-
const browserOverlay = ['safari-light', 'safari-dark', 'chrome-light', 'chrome-dark'].reduce(
9+
const browserOverlay = ['light', 'dark'].reduce(
1010
(acc, key) => ({
1111
...acc,
1212
[key]: path.resolve(__dirname, `browser/${key}.png`)
@@ -195,7 +195,7 @@ module.exports = page => async (url, opts = {}) => {
195195
const screenshot = await page.screenshot({ type, ...args })
196196
if (!overlay) return screenshot
197197

198-
const { browser: overlayBrowser = 'safari-light', color: overlayColor = 'transparent' } = overlay
198+
const { browser: overlayBrowser = 'light', color: overlayColor = 'transparent' } = overlay
199199

200200
let image = await sharp(browserOverlay[overlayBrowser]).composite([{ input: screenshot }])
201201

0 commit comments

Comments
 (0)