Created
December 4, 2008 23:22
-
-
Save tobi/32145 to your computer and use it in GitHub Desktop.
This file contains 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
// ==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