Skip to content

Instantly share code, notes, and snippets.

@tissak
Created November 29, 2010 06:38
Show Gist options
  • Save tissak/719662 to your computer and use it in GitHub Desktop.
Save tissak/719662 to your computer and use it in GitHub Desktop.
Darken done items and shuffle them down on complete
// ==UserScript==
// @name darken done
// @namespace http://fluidapp.com
// @description improve teuxdeux appearance
// @include *
// @author Tony Issakov
// ==/UserScript==
(function () {
css = $("<style>li.done{color:#555;}</style>");
document.head.appendChild(css.get(0));
$(".list_items li").click(function(){
var node = this;
var container = this.parentNode;
// wait a few ms for classes to be corrected and then react to the class state.
window.setTimeout(function(){
if($(node).hasClass('done')){
// move to the top of the done
$(container).find(".placeholder:first").before(node);
}
}, 500)
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment