From 903731723d8e35443bbc21c365993662df3388c7 Mon Sep 17 00:00:00 2001 From: Kylie C <52550063+Covkie@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:16:08 -0400 Subject: [PATCH] formatting + V's suggested changes to title prefix pruning --- src/main/mainWindow.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 39acec8..436a8ba 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -445,10 +445,11 @@ function createMainWindow() { }); if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault()); - else if (Settings.store.appBadge) mainWin.webContents.on('page-title-updated', (_, title) => { - let cleanedTitle = title.replace(/^\(\d+\)\s*|•\s/, ''); - mainWin.setTitle(cleanedTitle); - }); + else if (Settings.store.appBadge) + mainWin.webContents.on("page-title-updated", (_, title) => { + title = title.replace(/^\(\d+\)\s*|•\s/, ""); + mainWin.setTitle(title); + }); initWindowBoundsListeners(win); if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win);