forked from etodd/dialogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
34 lines (27 loc) · 721 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var app = module.exports = require('appjs');
app.serveFilesFrom(__dirname + '/content');
var window = app.createWindow(
{
width : 1280,
height : 720,
icons : __dirname + '/content/icons'
});
window.on('create', function()
{
window.frame.show();
window.frame.center();
});
window.on('ready', function()
{
window.require = require;
window.process = process;
window.module = module;
function F12(e) { return e.keyIdentifier === 'F12' }
function Command_Option_J(e) { return e.keyCode === 74 && e.metaKey && e.altKey }
window.addEventListener('keydown', function(e)
{
if (F12(e) || Command_Option_J(e))
window.frame.openDevTools();
});
window.dispatchEvent(new window.Event('app-ready'));
});