Open a website in a popup (macOS)
$ npm install --save website-popup
const websitePopup = require('website-popup');
const url = 'https://sindresorhus.com';
websitePopup(url, {width: 600, height: 400}).then(() => {
// closed
});
const close = websitePopup(url);
setTimeout(close, 2000);
Returns a Promise-like method to close the popup.
Type: string
URL to open.
Type: number
Default: 1280
Width of the popup.
Type: number
Default: 1024
Height of the popup.
- website-popup-cli - CLI for this module
MIT © Sindre Sorhus