Browse Source

Improve unread checking function

pull/1744/head
Carlos Ortega 7 years ago
parent
commit
c35e6bba9a
  1. 3
      app/store/ServicesList.js

3
app/store/ServicesList.js

@ -916,7 +916,8 @@ Ext.define('Rambox.store.ServicesList', {
,description: 'Text on your computer with Messages for web.'
,url: 'https://messages.android.com/'
,type: 'messaging'
,js_unread: 'function updateBadge(){var t = Array.prototype.slice.call(document.querySelectorAll('content div:empty')).reduce(function(c, e){return(window.getComputedStyle(e)["font-weight"]=="600")+c;},0)/4;var n=t>0?"("+t+") ":"";document.title=n+originalTitle}var originalTitle=document.title;setInterval(updateBadge,3e3);'
,dont_update_unread_from_title: true
,js_unread: 'function checkUnread(){var t = document.querySelectorAll(".tpEAA.yrs5ff").length;if(t>=1){rambox.setUnreadCount(t)}else{rambox.clearUnreadCount()}}setInterval(checkUnread,3000);'
}
]
});

Loading…
Cancel
Save