Created
June 13, 2012 12:49
-
-
Save q0rban/2923870 to your computer and use it in GitHub Desktop.
Flow Fluid UserScript
This file contains hidden or 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
| window.fluid.dockBadge = ''; | |
| setTimeout(updateDockBadge, 3000); | |
| setInterval(updateDockBadge, 5000); | |
| function updateDockBadge() { | |
| var badge = 0, | |
| overdue = $('b.badge.overdue').text(), | |
| inbox = $('b.badge.inbox-badge:visible').text(); | |
| if (overdue) { | |
| badge += parseInt(overdue); | |
| } | |
| if (inbox) { | |
| badge += parseInt(inbox); | |
| } | |
| window.fluid.dockBadge = (badge > 0) ? badge : ''; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment