mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-09-28 20:29:04 +00:00
Make title counter regex match '+' after number, used by certain sites (#424)
This commit is contained in:
parent
b5913b086e
commit
094cac23bc
@ -171,7 +171,7 @@ function createMainWindow(inpOptions, onAppQuit, setDockBadge) {
|
|||||||
|
|
||||||
if (options.counter) {
|
if (options.counter) {
|
||||||
mainWindow.on('page-title-updated', (e, title) => {
|
mainWindow.on('page-title-updated', (e, title) => {
|
||||||
const itemCountRegex = /[([{](\d*?)[}\])]/;
|
const itemCountRegex = /[([{](\d*?)\+?[}\])]/;
|
||||||
const match = itemCountRegex.exec(title);
|
const match = itemCountRegex.exec(title);
|
||||||
if (match) {
|
if (match) {
|
||||||
setDockBadge(match[1]);
|
setDockBadge(match[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user