Override hide(),show(),isVisible from inside plugin

instead of changing source code
This commit is contained in:
Araxeus
2021-03-22 04:01:19 +02:00
parent df8c77cd3e
commit 6427b3406c
4 changed files with 17 additions and 9085 deletions

View File

@ -3,6 +3,20 @@ const getSongInfo = require("../../providers/song-info");
const path = require('path');
module.exports = win => {
win.hide = function () {
win.minimize()
win.setSkipTaskbar(true);}
win.show = function () {
win.restore();
win.focus();
win.setSkipTaskbar(false);
}
win.isVisible = function () {
return !win.isMinimized();
}
const registerCallback = getSongInfo(win);
const { playPause, next, previous} = getSongControls(win);