From b99b033f331565df28128b76109f3a5a72911c30 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Tue, 7 Dec 2021 23:16:06 -0800 Subject: [PATCH] Update telegram js_unread to work for both WebK and WebZ variants. --- 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 1720340c..ef27beb7 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -95,7 +95,7 @@ Ext.define('Hamsket.store.ServicesList', { ,description: locale['services[7]'] ,url: 'https://web.telegram.org/' ,type: 'messaging' - ,js_unread: `let checkUnread=()=>{const e=document.querySelectorAll(".badge.unread");let t=0;for(let i of e)i.classList.contains("is-muted")||(t+=parseInt(i.innerHTML.trim()));hamsket.updateBadge(t)};setInterval(checkUnread,3e3);` + ,js_unread: `const checkUnread=()=>{const unread_messages=document.querySelectorAll(".badge.unread:not(.is-muted), .Badge.unread:not(.muted)");let count=0;for(const unread of unread_messages)count+=hamsket.parseIntOrZero(unread.textContent.trim());hamsket.updateBadge(count)};setInterval(checkUnread,3e3);` }, { id: 'wechat'