Last active
October 8, 2015 22:58
-
-
Save shesek/3401315 to your computer and use it in GitHub Desktop.
Trello - view cards you can work on
This file contains hidden or 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
javascript:(function(){var a,b;a=function(a){return function(){return!!~(this.alt||this.title).indexOf(a)}}($(".member-avatar").attr("title").match(/\(([\w\-]+)\)$/)[1]),b=function(){var b;return!(b=$(this).find(".member img,.member-initials")).length||b.filter(a).length},$("#board").addClass("filtering").find(".list-card").addClass("hide").filter(b).removeClass("hide")})() |
This file contains hidden or 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
# Shows cards that are "workable" by you, meaning they're either assigned to you or unassigned. | |
# Press "x" to return to normal mode. | |
# I got annoyed by having to manually look for cards that I can work on when pulling cards from the sprint to WIP, | |
# so I hacked that together. | |
is_me = do (me = $(".member-avatar").attr("title").match(/\(([\w\-]+)\)$/)[1]) -> | |
-> !!~(@alt or @title).indexOf me | |
is_workable = -> | |
not (members=$(this).find '.member img,.member-initials').length \ | |
or (members.filter is_me).length | |
$("#board").addClass("filtering") | |
.find(".list-card").addClass("hide") | |
.filter(is_workable).removeClass("hide") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment