Created
July 8, 2015 23:18
-
-
Save sebbean/f1df1afc7980d5d4825f to your computer and use it in GitHub Desktop.
Fluid app Inbox SSB userscript for unread email badge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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