-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (53 loc) · 1.24 KB
/
index.html
File metadata and controls
57 lines (53 loc) · 1.24 KB
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
56
57
<!DOCTYPE html>
<html>
<head>
<title>Trello</title>
<script>
window.location.href = 'https://trello.com/';
var gui = require('nw.gui');
var win = gui.Window.get();
// menu bar so we can get pasteboard working
// https://github.com/rogerwang/node-webkit/issues/1955
var nativeMenuBar = new gui.Menu({ type: "menubar" });
try {
nativeMenuBar.createMacBuiltin("Trello");
win.menu = nativeMenuBar;
} catch (ex) {
console.log(ex.message);
}
win.on('close', function(event) {
// handle quits - https://github.com/rogerwang/node-webkit/issues/430#issuecomment-58444117
if (event == 'quit') {
win.close(true);
}
else {
win.hide();
}
});
// Create a tray icon
var tray = new gui.Tray({ icon: 'trello-status.png' });
// Give it a menu
var menu = new gui.Menu();
menu.append(new gui.MenuItem({
label: 'Show',
click: function() {
//win.requestAttention(true);
win.show();
win.focus();
}
}));
menu.append(new gui.MenuItem({ type: 'separator' }));
menu.append(new gui.MenuItem({
label: 'Quit',
click: function() {
win.close(true);
gui.App.quit();
}
}));
tray.menu = menu;
</script>
</head>
<body>
<h1>Opening https://trello.com ...</h1>
</body>
</html>