// ==UserScript== // @name Trello coloured Scrum Kanban // @namespace https://trello.com/ // @version 3 // @description Colour list for Scrum, referenced with Kanban Game // @match https://trello.com/* // @require http://code.jquery.com/jquery-latest.js // @author Michael Wan // @downloadURL none // ==/UserScript== // Ref: https://stawebteam.wordpress.com/2014/03/07/coloured-lists-in-trello/ $(document).ready(function() { var red = '#fccbc2', blue = '#9ec4ff', green = '#dbffd1', grey = '#c4c4c4', black = '#898989', white = '#fff', yellow = '#ffd800', lightyellow = '#fdffbf', darkred = '#ff6363', lightblue = '#dbf3ff', lightorange = '#ffd396', darkdarkred = '#c1150f', pink = '#fabaff', orange = '#ff8300'; $('body').hover(function() { $("h2:contains('Development')").css('color', white).parents('.list').css('background', blue); $("h2:contains('Testing')").css('color', white).parents('.list').css('background', green); $("h2:contains('Ready to Deploy')").css('color', white).parents('.list').css('background', grey); $("h2:contains('Deployed')").css('color', white).parents('.list').css('background', black); $("a:contains('!')").parents("[data-testid='trello-card']").css('border-color', yellow).css('border-style', 'solid').css('border-width', '5px'); $("a:contains('!!')").parents("[data-testid='trello-card']").css('border-color', orange).css('border-style', 'solid').css('border-width', '5px'); $("a:contains('`')").parents("[data-testid='trello-card']").css('border-color', lightblue).css('border-style', 'solid').css('border-width', '5px'); $("a:contains('[P]')").parents("[data-testid='trello-card']").css('background', lightyellow); $("a:contains('[Parent]')").parents("[data-testid='trello-card']").css('background', lightyellow); $(".card-short-id").append(" ").removeClass("hide").css('color', lightorange); $("a[class='trello-card-title js-card-name']").filter(function () { return !new RegExp("\\(\\d+\\)").test($(this).text()); }).find(".card-short-id").css('color', darkdarkred); $("a:contains('Blocked')").parents("[data-testid='trello-card']").css('background', pink); $("a:contains('[VIP]')").parents("[data-testid='trello-card']").css('background', darkred); $("a:contains('[R]')").parents("[data-testid='trello-card']").css('background', '#eeffbf'); $("a:contains('[INFO]')").parents("[data-testid='trello-card']").css('background', '#e0f8ff'); }); function printOneMemberWIP(value, key, map) { var WIP_LIMIT = 2; if (value == 0 || value > WIP_LIMIT) { $("#actualWIP").append("" + key + ": " + value + " , "); } else { $("#actualWIP").append(key + ": " + value + " , "); } } function printWIP() { var text = ""; $("#actualWIP").remove(); $(".board-header").after("
#Cards:${listcardLength} #StoryPt:${listStoryPt}`; if (missedPtCardNumber > 0) { appendElement += ` #Miss:${missedPtCardNumber}`; } appendElement += `
`; $('textarea.list-header-name').filter(function() { return $(this).text() === listname; }).after(appendElement) ; }) ; setTimeout(function(){ printListInsight(); }, 1000); } printWIP(); printListInsight(); });