diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index 1afa26f4..49a3e9c1 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -28,7 +28,7 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[0]'] ,url: 'https://web.whatsapp.com/' ,type: 'messaging' - ,js_unread: 'function checkUnread(){const elements = document.querySelectorAll(\'.P6z4j, .unread\');let count = 0;for (let i = 0; i < elements.length; i++) {if (elements[i].querySelectorAll(\'*[data-icon="muted"]\').length === 0) {count++;}}updateBadge(count);}function updateBadge(count){if(count && count>=1){rambox.setUnreadCount(count);}else{rambox.clearUnreadCount();}}setInterval(checkUnread, 1e3);(async()=>{try{const a=await window.navigator.serviceWorker.getRegistrations();for(const b of a)b.unregister()}catch(a){}})();' + ,js_unread: 'function checkUnread(){const elements = document.querySelectorAll(\'.P6z4j, .unread\');let count = 0;for (let i = 0; i < elements.length; i++) {if (elements[i].parentNode.parentNode.querySelectorAll(\'*[data-icon="muted"]\').length === 0) {count++;}}updateBadge(count);}function updateBadge(count){if(count && count>=1){rambox.setUnreadCount(count);}else{rambox.clearUnreadCount();}}setInterval(checkUnread, 1e3);(async()=>{try{const a=await window.navigator.serviceWorker.getRegistrations();for(const b of a)b.unregister()}catch(a){}})();' }, { id: 'slack'