Skip to content

Instantly share code, notes, and snippets.

@zhimsel
Created January 27, 2016 20:40
Show Gist options
  • Save zhimsel/3c4d1c1225e48122a8de to your computer and use it in GitHub Desktop.
Save zhimsel/3c4d1c1225e48122a8de to your computer and use it in GitHub Desktop.
Fluidapp Dock Badge for Asana Notifications
window.fluid.dockBadge = "";
setTimeout(updateDockBadge, 1000);
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 1000);
function updateDockBadge() {
var inbox = document.getElementsByClassName("has-newNotifications");
if (Object.keys(inbox).length > 1) {
window.fluid.dockBadge = "•";
} else {
window.fluid.dockBadge = "";
}
}
@zhimsel
Copy link
Author

zhimsel commented Jan 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment