Skip to content

Instantly share code, notes, and snippets.

@YANOUSHek
Created July 14, 2011 15:32
Show Gist options
  • Save YANOUSHek/1082684 to your computer and use it in GitHub Desktop.
Save YANOUSHek/1082684 to your computer and use it in GitHub Desktop.
Fluid icon badge for Google+
window.fluid.dockBadge = "";
var count = 0;
setInterval(badge, 5000);
function badge() {
var el = document.getElementById("gbi1");
if (el == null) {
if (count++ > 5) {
window.fluid.dockBadge = "!";
}
} else {
if (el.innerHTML != " " && el.innerHTML != "0") {
window.fluid.dockBadge = el.innerHTML;
} else {
window.fluid.dockBadge = "";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment