From d619a66a99eb5d311d37ce1e5291e173fb21ef5a Mon Sep 17 00:00:00 2001 From: Juan Manuel Gonzalez Alama Date: Tue, 4 Jun 2019 13:59:53 -0300 Subject: [PATCH] Update ServicesList.js Fixed counter for gmail and outlook. --- app/store/ServicesList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index 0ef04bff..1afa26f4 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -120,7 +120,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://mail.google.com/mail/' ,type: 'email' ,allow_popups: true - ,js_unread: 'function checkUnread(){var e=document.querySelector(".aim .aio").querySelector("span").querySelector("a").getAttribute("aria-label").replace(/\D/g,"");updateBadge(e?parseInt(e):0)}function updateBadge(e){1<=e?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' + ,js_unread: 'function checkUnread(){var e=document.querySelector(".aim .aio").querySelector("span").querySelector("a").getAttribute("aria-label").replace(/[^0-9]/g, "");updateBadge(e?parseInt(e):0)}function updateBadge(e){1<=e?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' ,note: 'To enable desktop notifications, you have to go to Settings inside Gmail. Read more...' }, { @@ -199,7 +199,7 @@ Ext.define('Rambox.store.ServicesList', { ,url: 'https://mail.live.com/' ,type: 'email' ,manual_notifications: true - ,js_unread: 'function checkUnread(){var a=$(".subfolders [role=treeitem]:first .treeNodeRowElement").siblings().last().text();updateBadge(""===a?0:parseInt(a))}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' + ,js_unread: 'function checkUnread(){var e=null!==$(".ms-FocusZone [role=tree]:last i[data-icon-name=Inbox]").siblings()[1].querySelector("span span")?$(".ms-FocusZone [role=tree]:last i[data-icon-name=Inbox]").siblings()[1].querySelector("span span").innerText:0;updateBadge(""===e?0:parseInt(e))}function updateBadge(e){1<=e?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' }, { id: 'outlook365'