Created
May 20, 2014 20:42
-
-
Save itod/7e1271a641e001d2f55d to your computer and use it in GitHub Desktop.
FeedBin Fluid
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, 1000); | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 5000); | |
function updateDockBadge() { | |
var newBadge = ''; | |
var els = document.querySelectorAll('.feed-link .count'); | |
for (var i = 0; i < els.length; ++i) { | |
var el = els[i]; | |
var txt = el.innerText; | |
if (txt && txt.length) { | |
window.fluid.dockBadge = '' + txt; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment