mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
Override hide(),show(),isVisible from inside plugin
instead of changing source code
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user