From e289462739ad1186e1b43f2f1d0668a17ba75b93 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Fri, 8 Jun 2018 19:21:04 -0700 Subject: [PATCH] Fix ICQ's update count. Make it use the non-title update method as recommended in the documentation while we're at it. --- app/store/ServicesList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/store/ServicesList.js b/app/store/ServicesList.js index e2d21734..9b1ad565 100644 --- a/app/store/ServicesList.js +++ b/app/store/ServicesList.js @@ -361,7 +361,8 @@ Ext.define('Rambox.store.ServicesList', { ,description: locale['services[35]'] ,url: 'https://web.icq.com/' ,type: 'messaging' - ,js_unread: 'function checkUnread(){updateBadge(parseInt(document.getElementsByClassName("nwa-msg-counter")[0].style.display==="block"?document.getElementsByClassName("nwa-msg-counter")[0].innerHTML.trim():0))}function updateBadge(e){e>=1?document.title="("+e+") "+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,3000);' + ,js_unread: 'function checkUnread(){let total=0;for(let counter of document.getElementsByClassName("icq-msg-counter"))total+=parseInt("block"===counter.style.display?counter.innerHTML.trim():0);updateBadge(total)}function updateBadge(e){e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);' + ,dont_update_unread_from_title: true ,titleBlink: true }, {