mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Always inject style
This commit is contained in:
@ -15,8 +15,6 @@ const togglePiP = async (win) => {
|
||||
isInPiPMode = !isInPiPMode;
|
||||
|
||||
if (isInPiPMode) {
|
||||
injectCSS(win.webContents, path.join(__dirname, "style.css"));
|
||||
|
||||
originalPosition = win.getPosition();
|
||||
originalSize = win.getSize();
|
||||
|
||||
@ -52,6 +50,7 @@ const togglePiP = async (win) => {
|
||||
};
|
||||
|
||||
module.exports = (win) => {
|
||||
injectCSS(win.webContents, path.join(__dirname, "style.css"));
|
||||
ipcMain.on("picture-in-picture", async () => {
|
||||
await togglePiP(win);
|
||||
});
|
||||
|
||||
@ -5,3 +5,9 @@ body {
|
||||
button {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
ytmusic-player-bar.pip svg,
|
||||
ytmusic-player-bar.pip yt-formatted-string {
|
||||
filter: drop-shadow(2px 4px 6px black);
|
||||
color: white;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user