Skip to content

Instantly share code, notes, and snippets.

@tobi
Created December 4, 2008 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobi/32145 to your computer and use it in GitHub Desktop.
Save tobi/32145 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name tasks
// @namespace http://fluidapp.com
// @description Shows pending tasks as badge in fluid and nags by growl every hour or so until you do them all
// @include https://*.highrisehq.com/
// @author Tobi
// ==/UserScript==
(function () {
if (window.fluid) {
var hours = new Date().getHours();
var updater = function() {
var tasks = $$('.overdue .task').size() + $$('.today .task').size();
if(tasks > 0) { window.fluid.dockBadge = tasks; }
else { window.fluid.dockBadge = ''; }
if (tasks > 0 && (new Date()).getHours() != hours) {
window.fluid.showGrowlNotification({
title: "Highrise",
description: "There are "+tasks+" task(s) left to be done in today..",
priority: 1,
sticky: true
});
hours = (new Date()).getHours();
}
};
updater();
// every 5 minutes
window.setInterval(updater, 5000);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment