Last active
February 27, 2016 06:34
-
-
Save ascendbruce/eca49be010e1ca2d203a to your computer and use it in GitHub Desktop.
Show cards count bookmarklet for Trello
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
javascript: ! function() { | |
$(".js-num-cards").each(function(i) { | |
var size = $(".js-list:nth(" + i + ") .list-card-details").length; | |
$(".js-num-cards:nth(" + i + ")").text(size + " cards"); | |
}); | |
$(".js-num-cards").toggleClass('hide'); | |
if ($(".board-header-btn-name .js-list-card-count").length === 0) { | |
$(".board-header-btn-name span").append(" <span class=\"js-list-card-count\"></span>"); | |
$(".board-header-btn-name .js-list-card-count").hide(); | |
} | |
$(".board-header-btn-name .js-list-card-count").text("(" + $(".list-card-details").length + ")"); | |
$(".js-list-card-count").toggle(); | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment