ryzen-controller/js/menuHandler.js
Quentin “Storm1er” Decaunes 7040a31f1c feat: UI updated by @JamesCJ.
2020-01-02 09:38:14 +00:00

22 lines
617 B
JavaScript

const {remote} = require('electron');
document.getElementById('close').addEventListener('click', closeWindow);
document.getElementById('minimize').addEventListener('click', minimizeWindow);
document.getElementById('maximize').addEventListener('click', maximizeWindow);
function closeWindow () {
var window = remote.getCurrentWindow();
window.close();
}
function minimizeWindow () {
var window = remote.getCurrentWindow();
window.minimize();
}
function maximizeWindow () {
var window = remote.getCurrentWindow()
window.isMaximized() ? window.unmaximize() : window.maximize();
}