OSDN Git Service

403105fc79480d96ab0ad976e0b292aadeffe16a
[commentgenerator-electron/CommentGenerator-Electron.git] / src / plugin / NavigatorOnLine / index.js
1 module.exports = async (app, BrowserWindow) => {
2     let onlineStatusWindow
3
4     function createWindow() {
5         onlineStatusWindow = new BrowserWindow({
6             width: 0, height: 0, show: false,
7             webPreferences: {
8                 sandbox: true
9             }
10         })
11         onlineStatusWindow.loadURL(`file://${__dirname}/index.html`)
12         onlineStatusWindow.webContents.openDevTools();
13     }
14
15     app.whenReady().then(() => {
16         createWindow()// <-- function createWindow のやつを動かす。
17     })
18 }