Browse Source

Update telegram js_unread to work for both WebK and WebZ variants.

pull/3202/head
TheGoddessInari 3 years ago
parent
commit
b99b033f33
No known key found for this signature in database
GPG Key ID: 1209B1B7632D69A
  1. 2
      app/store/ServicesList.js

2
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'

Loading…
Cancel
Save