-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.html
55 lines (49 loc) · 1.16 KB
/
start.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<script>
var gui = require('nw.gui');
var tray = new gui.Tray({
title: 'Tray',
tooltip: 'Tray Menu',
icon: 'tray.png'
});
var menu = new gui.Menu();
// menu.append(new gui.MenuItem({
// type: 'normal',
// label: 'Open Application',
// click: function () {
// window.open('main/index.html', '_blank');
// }
// }));
// menu.append(new gui.MenuItem({
// type: 'separator'
// }));
menu.append(new gui.MenuItem({
type: 'normal',
label: 'Exit',
click: function () {
gui.App.quit();
}
}));
tray.menu = menu;
// tray.on('click', function () {
// window.open('main/index.html', '_blank');
// });
var win = nw.Window.get();
// Create a new window and get it
// nw.Window.open('https://github.com/nwjs/nw.js', {}, function(new_win) {
// // do something with the newly created window
// });
// remove auto open
setTimeout(function () {
nw.Window.open('main/index.html', {
// "show": false,
// "frame": false,
// "icon": 'tray.png',
// "fullscreen": true,
});
}, 2000);
</script>
</head>
</html>