Skip to content

Commit 7b308aa

Browse files
committed
fix: set headless to false
1 parent b4a76f7 commit 7b308aa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,12 @@ app.get('/history/charts/:country', async (req, res, next) => {
227227
const browser = await puppeteer.launch({
228228
args: chrome.args,
229229
executablePath: await chrome.executablePath,
230-
headless: chrome.headless,
230+
headless: false,
231+
defaultViewport: {width: 1440, height: 800},
231232
});
232-
233+
233234
const page = await browser.newPage();
234-
page.setViewport({width: 1440, height: 800})
235+
//page.setViewport({width: 1440, height: 800})
235236
await page.goto(req.protocol + '://' + req.get('host') +'/history/charts/web/'+s.country);
236237
let p = await page.screenshot({encoding: 'base64', type: 'png'});
237238
await browser.close();

lib/cli/gfx/terminal-template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const html = (data) => {
2323
margin:0;padding:0;
2424
overflow:hidden;
2525
}
26+
2627
textarea, .xterm-char-measure-element, .xterm-scroll-area{
2728
display: none;
2829
}

0 commit comments

Comments
 (0)