Skip to content

Instantly share code, notes, and snippets.

@than
Last active October 30, 2016 18:38
Show Gist options
  • Save than/0a3f22d0d66a16b0fb17 to your computer and use it in GitHub Desktop.
Save than/0a3f22d0d66a16b0fb17 to your computer and use it in GitHub Desktop.
Fastmail Fluid app Dock Badge userscript
// Fastmail app icon: http://than.to/1iMcu
setInterval(updateDockBadge, 3000);
function updateDockBadge() {
var count = document.getElementsByClassName('v-FolderSource-badge')[0].textContent;
if ( count === '0' ) {
window.fluid.dockBadge = '';
} else {
window.fluid.dockBadge = count;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment