11 lines
305 B
JavaScript
11 lines
305 B
JavaScript
const browser = require('../browser');
|
|
|
|
module.exports = async ({ url = null }) => {
|
|
await browser.start();
|
|
await browser.newTab(url);
|
|
const p = browser.page;
|
|
const finalUrl = url || p.url();
|
|
const title = await p.title();
|
|
return { success: true, action: 'new_tab', url: finalUrl, title };
|
|
};
|