Created
November 29, 2010 06:38
-
-
Save tissak/719662 to your computer and use it in GitHub Desktop.
Darken done items and shuffle them down on complete
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 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