Created
May 23, 2012 08:45
-
-
Save qoobaa/2773966 to your computer and use it in GitHub Desktop.
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
// ==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