Initialize the Script with the first browser tab (#47)
Suggestion for the script to start under the first tab of the browser, in order to reduce memory consumption.
This commit is contained in:
parent
d5a26add20
commit
e385563883
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ class Client extends EventEmitter {
|
|||
*/
|
||||
async initialize() {
|
||||
const browser = await puppeteer.launch(this.options.puppeteer);
|
||||
const page = await browser.newPage();
|
||||
const page = (await browser.pages())[0];
|
||||
page.setUserAgent(UserAgent);
|
||||
|
||||
if (this.options.session) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue