Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const aboutWindow = () => { /* bringYourOwnWindow impl */
debug('aboutWindow')
const path = require('path'),
root = path.join(__dirname, '..', '..'),
settings = require(path.join(root, 'build', './config.json'))
const foo = require('about-window').default({
product_name: settings.productName,
icon_path: path.join(root, settings.largeIcon),
package_json_dir: path.join(root, 'build'),
use_inner_html: true,
css_path: [path.join(__dirname, '../../content/css/themes/', settings.cssTheme),
path.join(__dirname, 'about.css')],
win_options: { width: 600, height: 600 }
})
// remove the click handler from the title element
foo.webContents.on('did-finish-load', () => {
foo.webContents.executeJavaScript("const t = document.querySelector('.title'), c=t.cloneNode(false); while (t.hasChildNodes()) c.appendChild(t.firstChild); t.parentNode.replaceChild(c, t);")
})
}
{ label: 'About', click: () => { openAboutWindow(Object.assign({}, aboutOptions)); }},
{ label: 'Quit', accelerator: 'Command+Q', click: () => { app.quit(); }}