Skip to content

Instantly share code, notes, and snippets.

@ascendbruce
Last active February 27, 2016 06:34
Show Gist options
  • Save ascendbruce/eca49be010e1ca2d203a to your computer and use it in GitHub Desktop.
Save ascendbruce/eca49be010e1ca2d203a to your computer and use it in GitHub Desktop.
Show cards count bookmarklet for Trello
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