Browse Source

Update Slack unreadCode

pull/2938/head
Vulich Fernando 4 years ago committed by GitHub
parent
commit
f464a959b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      api/services.json

6
api/services.json

@ -1163,7 +1163,7 @@
"type": "messaging", "type": "messaging",
"allow_popups": false, "allow_popups": false,
"manual_notifications": false, "manual_notifications": false,
"js_unread": "function checkUnread(){if(-1!==location.host.indexOf(\"slack.com\")){var e=document.querySelectorAll(\".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)\").length,n=0;document.querySelectorAll(\".p-channel_sidebar__badge\").forEach(e=>{n+=isNaN(parseInt(e.innerHTML))?0:parseInt(e.innerHTML)}),updateBadge(e,n)}}function updateBadge(e,n){var a=0<n?n:0<e?999999:0;rambox.setUnreadCount(a)}setInterval(checkUnread,3e3),0<location.href.indexOf(\"/ssb/redirect?entry_point=workspace_signin\")&&(location.href=location.origin);", "js_unread": "function checkUnread(){if(document.querySelector(\".p-download_modal__body .p-download_modal__close\")&&document.querySelector(\".p-download_modal__body .p-download_modal__close\").click(),-1!==location.host.indexOf(\"slack.com\")){var e=document.querySelectorAll(\".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)\").length,n=0;document.querySelectorAll(\".p-channel_sidebar__badge\").forEach(e=>{n+=isNaN(parseInt(e.innerHTML))?0:parseInt(e.innerHTML)}),updateBadge(e,n)}}function updateBadge(e,n){var o=0<n?n:0<e?999999:0;rambox.setUnreadCount(o)}setInterval(checkUnread,3e3),0<location.href.indexOf(\"/ssb/redirect?entry_point=workspace_signin\")&&(location.href=location.origin);",
"userAgent": "", "userAgent": "",
"note": "", "note": "",
"titleBlink": false, "titleBlink": false,
@ -1313,7 +1313,7 @@
"type": "messaging", "type": "messaging",
"allow_popups": false, "allow_popups": false,
"manual_notifications": false, "manual_notifications": false,
"js_unread": "function checkUnread(){let e=document.querySelector(\"#top-navigation #activity .badge\").innerHTML;updateBadge(parseInt(e))}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "js_unread": "function checkUnread(){let e=0;document.querySelectorAll(\"#main-nav .badge\").forEach(n=>{parseInt(n.innerText)&&(e+=parseInt(n.innerText))}),updateBadge(e)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);",
"userAgent": "", "userAgent": "",
"note": "", "note": "",
"titleBlink": false, "titleBlink": false,
@ -1628,7 +1628,7 @@
"type": "messaging", "type": "messaging",
"allow_popups": false, "allow_popups": false,
"manual_notifications": false, "manual_notifications": false,
"js_unread": "NotifyByTitle.show = function(){};NotifyByTitle.start = function(){};NotifyByTitle.stop = function(){};function checkUnread(){var t=0;$(\".msgnotify\").each(function() { t += isNaN(parseInt($(this).html())) ? 0 : parseInt(parseInt($(this).html())) });updateBadge(t)}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "js_unread": "function checkUnread(){const e=document.getElementsByClassName(\"LHS-count\");let n=0;for(let t of e)\"totalunreadcount\"===t.id&&parseInt(t.innerText)&&(n+=parseInt(t.innerText));updateBadge(n)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);",
"userAgent": "", "userAgent": "",
"note": "", "note": "",
"titleBlink": false, "titleBlink": false,

Loading…
Cancel
Save