Run headless chromium with --hide-scrollbars
This patch runs chromium in headless mode with the --hide-scrollbars flag so that it doesn't spoil screenshots. Fixes #68.
This commit is contained in:
parent
50d9c186b5
commit
b6d0ebfbf2
@ -50,6 +50,7 @@ class Browser {
|
|||||||
this._chromeArguments.push(...[
|
this._chromeArguments.push(...[
|
||||||
`--headless`,
|
`--headless`,
|
||||||
`--disable-gpu`,
|
`--disable-gpu`,
|
||||||
|
`--hide-scrollbars`,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (typeof options.executablePath === 'string') {
|
if (typeof options.executablePath === 'string') {
|
||||||
|
@ -28,11 +28,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
/* Hide scrollbar so that it is not captured on screenshots */
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user