sandbox-clinic/main.js

26 lines
608 B
JavaScript
Raw Normal View History

2020-02-04 08:54:03 +07:00
const electron = require("electron");
2020-02-13 14:54:45 +07:00
const { app, BrowserWindow } = electron;
2020-02-04 08:54:03 +07:00
2020-02-13 14:34:09 +07:00
let mainApp;
2020-02-13 12:42:46 +07:00
2020-02-13 14:34:09 +07:00
app.allowRendererProcessReuse = true;
2020-02-04 08:54:03 +07:00
app.on("ready", () => {
2020-02-13 14:34:09 +07:00
mainApp = new BrowserWindow({
2020-02-04 08:54:03 +07:00
width: 1000,
height: 700
});
2020-02-13 14:34:09 +07:00
mainApp.webContents.executeJavaScript(`localStorage.setItem("author", "Sambo Chea <sombochea@cubetiqs.com>")`)
mainApp.webContents.executeJavaScript(`localStorage.setItem("IS_ELECTRON", true)`)
mainApp.setFullScreen(true)
mainApp.setTitle("DR PROFESSIONAL CLINIC");
2020-02-13 17:53:53 +07:00
mainApp.loadURL(process.env.DR_URL);
2020-02-04 08:54:03 +07:00
2020-02-13 14:34:09 +07:00
mainApp.on("closed", () => {
mainApp = null;
2020-02-04 08:54:03 +07:00
});
});