mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-23 02:23:31 +07:00
22 lines
617 B
JavaScript
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();
|
||
|
}
|