formatting + V's suggested changes to title prefix pruning

This commit is contained in:
Kylie C 2024-07-04 14:16:08 -04:00
parent 3ff6e45ff9
commit 903731723d

View file

@ -445,10 +445,11 @@ function createMainWindow() {
}); });
if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault()); if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault());
else if (Settings.store.appBadge) mainWin.webContents.on('page-title-updated', (_, title) => { else if (Settings.store.appBadge)
let cleanedTitle = title.replace(/^\(\d+\)\s*|•\s/, ''); mainWin.webContents.on("page-title-updated", (_, title) => {
mainWin.setTitle(cleanedTitle); title = title.replace(/^\(\d+\)\s*|•\s/, "");
}); mainWin.setTitle(title);
});
initWindowBoundsListeners(win); initWindowBoundsListeners(win);
if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win); if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win);