Browse Source

Update unreadCode: Mattermost & GoogleChat

fixes https://github.com/ramboxapp/community-edition/issues/3009
gh-pages
Vulich Fernando 4 years ago committed by GitHub
parent
commit
990ee0fb06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      api/services.json

4
api/services.json

@ -503,7 +503,7 @@
"type": "messaging",
"allow_popups": false,
"manual_notifications": false,
"js_unread": "function checkUnread(){updateBadge(document.querySelectorAll(\".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .PIw6Oe.EdWvwd.FVKzAb .SaMfhe.m9MHid\").length)}function updateBadge(a){1<=a?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);",
"js_unread": "function checkUnread(){if(document.querySelectorAll(\".akt .XU\").length>0){let e=0;document.querySelectorAll(\".akt .XU\").forEach(t=>e+=t.innerText&&parseInt(t.innerText)),updateBadge(e)}else updateBadge(document.querySelectorAll(\".SSPGKf.EyyDtb.Q6oXP:not(.oCHqfe) .PIw6Oe.EdWvwd.FVKzAb .SaMfhe.m9MHid\").length||0)}function updateBadge(e){1<=e?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);",
"userAgent": "",
"note": "",
"titleBlink": true,
@ -818,7 +818,7 @@
"type": "messaging",
"allow_popups": false,
"manual_notifications": false,
"js_unread": "function checkUnread(){var e=document.querySelectorAll(\".has-badge\"),t=document.querySelectorAll(\".unread-title\").length,a=0;e.forEach(e=>{a+=parseInt(e.querySelector(\".badge\").innerText)}),updateBadge(t,a)}function updateBadge(e,t){var a=0<t?t:0<e?999999:0;rambox.setUnreadCount(a)}setInterval(checkUnread,3e3);",
"js_unread": "function checkUnread(){let e=document.querySelectorAll(\".badge\"),n=document.querySelectorAll(\".unread-title\").length||document.querySelectorAll(\".unread-badge\").length,t=0;e.forEach(e=>{\"unreadMentions\"===e.id&&(t+=parseInt(e.innerText))}),updateBadge(n,t)}function updateBadge(e,n){var t=0<n?n:0<e?999999:0;rambox.setUnreadCount(t)}setInterval(checkUnread,3e3);",
"userAgent": "",
"note": "",
"titleBlink": false,

Loading…
Cancel
Save