2
2
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:
Robert Swain 2016-01-30 16:42:08 +01:00 committed by Robert Swain
parent 8041663d82
commit d386598770

View File

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