-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
32 lines (30 loc) · 915 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Idobata</title>
<style>
html, body { height: 100%; }
body { margin: 0px; }
webview {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<webview id="idobata" src="https://idobata.io/" autosize='on' preload='./preload.js'></webview>
<script>
const {shell, remote, ipcRenderer} = require('electron');
const {Menu, MenuItem} = remote;
const menuTemplate = require('./menu-template');
const currentMode = ipcRenderer.sendSync('getNotificationMode');
const menu = Menu.buildFromTemplate(menuTemplate.getTemplate(currentMode));
Menu.setApplicationMenu(menu);
const webview = document.getElementById('idobata');
webview.addEventListener('new-window', ({url}) => {
shell.openExternal(url);
});
</script>
</body>
</html>