Skip to content

Instantly share code, notes, and snippets.

@johanoloflindberg
Forked from itod/feedbin.js
Created November 21, 2016 03:15
Show Gist options
  • Save johanoloflindberg/5c8d3020f2bff866bb559bb2cd580797 to your computer and use it in GitHub Desktop.
Save johanoloflindberg/5c8d3020f2bff866bb559bb2cd580797 to your computer and use it in GitHub Desktop.
FeedBin Fluid
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