Skip to content

Instantly share code, notes, and snippets.

@qoobaa
Created May 23, 2012 08:45
Show Gist options
  • Save qoobaa/2773966 to your computer and use it in GitHub Desktop.
Save qoobaa/2773966 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Trello ID
// @author Jakub Kuźma
// @version 0.1.1
// @description Displays IDs on the cards
// @include https://trello.com/*
// ==/UserScript==
var main = function () {
setInterval(function () {
$(".list-card:not(:has(.list-card-id))").each(function (i, listCard) {
var href = $(listCard).find("a.list-card-title").attr("href"),
id = href.match(/\d+$/)[0];
$(listCard).append('<div class="list-card-id">#' + id + '</div>');
});
}, 1000);
};
var script = document.createElement("script");
script.type = "text/javascript";
script.textContent = "(" + main.toString() + ")();";
document.body.appendChild(script);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment