From ef015d60c6767e869edcee0f85a2be722123c020 Mon Sep 17 00:00:00 2001 From: Juan Manuel Gonzalez Alama Date: Fri, 7 Jun 2019 15:47:55 -0300 Subject: [PATCH] Update ServicesList.js Fixed muted element query. --- app/store/ServicesList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'