Skip to content

Instantly share code, notes, and snippets.

@sebbean
Created July 8, 2015 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebbean/f1df1afc7980d5d4825f to your computer and use it in GitHub Desktop.
Save sebbean/f1df1afc7980d5d4825f to your computer and use it in GitHub Desktop.
Fluid app Inbox SSB userscript for unread email badge
updateBadge();
setTimers();
function setTimers() {
setTimeout(checkUnread, 3000);
setInterval(checkUnread, 3000);
}
function checkUnread() {
// updateBadge(document.getElementsByClassName('top-level-item').length);
updateBadge(document.getElementsByClassName('qG').length);
}
function updateBadge(count) {
window.fluid.dockBadge = (count >= 1) ? count : '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment