UNPKG

quickbuild

Version:

A mature, feature-complete application generator with an emphasis on speed

15 lines (12 loc) 417 B
const {app, dialog} = require('electron') const path = require('path') if (process.defaultApp) { if (process.argv.length >= 2) { app.setAsDefaultProtocolClient('electron-api-demos', process.execPath, [path.resolve(process.argv[1])]) } } else { app.setAsDefaultProtocolClient('electron-api-demos') } app.on('open-url', (event, url) => { dialog.showErrorBox('Welcome Back', `You arrived from: ${url}`) })