Created
January 27, 2016 20:40
-
-
Save zhimsel/3c4d1c1225e48122a8de to your computer and use it in GitHub Desktop.
Fluidapp Dock Badge for Asana Notifications
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, 1000); | |
function updateDockBadge() { | |
var inbox = document.getElementsByClassName("has-newNotifications"); | |
if (Object.keys(inbox).length > 1) { | |
window.fluid.dockBadge = "•"; | |
} else { | |
window.fluid.dockBadge = ""; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made a full repo for this: https://github.com/zhimsel/fluidapp_asana_notifications