Always inject style

This commit is contained in:
TC
2022-04-09 12:10:22 +02:00
parent 742a949680
commit 296ecb6740
2 changed files with 7 additions and 2 deletions

View File

@ -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);
});

View File

@ -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;
}