mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38: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) {
|
if (options.counter) {
|
||||||
const itemCountRegex = /[\(](\d*?)[\)]/;
|
const itemCountRegex = /[\(\[{](\d*?)[}\]\)]/;
|
||||||
const match = itemCountRegex.exec(mainWindow.getTitle());
|
const match = itemCountRegex.exec(mainWindow.getTitle());
|
||||||
if (match) {
|
if (match) {
|
||||||
setDockBadge(match[1]);
|
setDockBadge(match[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user