mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
counter: Allow for [x] and {x} forms of notification count
This commit is contained in:
parent
8041663d82
commit
d386598770
@ -72,7 +72,7 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
|
||||
}
|
||||
|
||||
if (options.counter) {
|
||||
const itemCountRegex = /[\(](\d*?)[\)]/;
|
||||
const itemCountRegex = /[\(\[{](\d*?)[}\]\)]/;
|
||||
const match = itemCountRegex.exec(mainWindow.getTitle());
|
||||
if (match) {
|
||||
setDockBadge(match[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user