This repository has been archived on 2019-03-08. You can view files and clone it, but cannot push or open issues or pull requests.
MillionHopes/dock.js
2017-07-03 18:55:37 +07:00

35 lines
1.1 KiB
JavaScript

const { app, Menu } = require('electron');
const ipc = require('electron').ipcMain;
const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F27E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36'};
module.exports.navitemplate = function(win){
const template = [
{
label: "My Page",
click(){ win.loadURL("http://imas.gree-apps.net/app/index.php/mypage",options)}
},
{
label: "Eigyo",click() {win.loadURL("http://imas.gree-apps.net/app/index.php/eigyo?from=mypage_main_button",options) }
},
{
label: "Lesson",
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/lesson",options)}
},
{
label: "Gasha",
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/gasha",options)}
},
{
label: "Event",
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/event",options)}
},
]
return template;
}
module.exports.setdock = function(win) {
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
app.dock.setMenu(dockMenu);
}