您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
扩展trello.com看板的功能
当前为
// Generated by CoffeeScript 1.9.1 /* // ==UserScript== // @name Trello - Thenow Trello Extend // @namespace http://ejiasoft.com/ // @version 1.0 // @description Extend trello.com // @description:zh-CN 扩展trello.com看板的功能 // @homepageurl https://github.com/thenow/ThenowTrelloExtend // @author thenow // @match http*://*trello.com // @match http*://*trello.com/* // @grant none // ==/UserScript== */ (function() { var curUrl, imgSwitch_click, init, listCardFormat, listFormatInit, listTitleFormat, pageRegex; curUrl = window.location.href; pageRegex = { CardLimit: /\[\d+\]/, Category: /{.+}/, User: /`.+`/, CardCount: /^\d+/, Number: /\d+/, CardNum: /^#\d+/, HomePage: /com[\/]$/ }; listCardFormat = function(objCard) { var cardNum, cardTitle, spanCardNum; cardTitle = objCard.find('a.list-card-title').text(); cardNum = pageRegex.cardNum.exec(cardTitle)[0]; return spanCardNum = $("<span class=\"card-short-id\">" + cardnum + "</span>"); }; listTitleFormat = function(objList) { var cardCount, cardLimit, cardLimitInfo, curCardCountP, curListHeader, curListTitle; curListHeader = objList.find('div.list-header'); curListTitle = curListHeader.find('textarea.list-header-name').val(); cardLimitInfo = pageRegex.CardLimit.exec(curListTitle); if (cardLimitInfo === null) { return false; } curCardCountP = curListHeader.find('p.list-header-num-cards'); cardCount = pageRegex.CardCount.exec(curCardCountP.text())[0]; cardLimit = pageRegex.Number.exec(cardLimitInfo[0])[0]; if (cardCount > cardLimit) { return objList.css('background', '#903'); } else if (cardCount === cardLimit) { return objList.css('background', '#c93'); } }; listFormatInit = function() { return $('div.list').each(function() { listTitleFormat($(this)); return $(this).find('div.list-card').each(function() { return listCardFormat($(this)); }); }); }; imgSwitch_click = function() { var imgSwitch; imgSwitch = $('<a class="board-header-btn board-header-btn-org-name board-header-btn-without-icon"><span class="board-header-btn-text">隐藏/显示图片</span></a>'); $('div.board-header').append(imgSwitch); return imgSwitch.click(function() { return $('div.list-card-cover').slideToggle(); }); }; init = function() { var initTimer, loadFinish; loadFinish = false; return initTimer = setTimeout((function() { if (loadFinish) { clearTimeout(initTimer); } loadFinish = $('p.list-header-num-cards').length > 0; if (loadFinish) { $('p.list-header-num-cards').show(); $('span.card-short-id').append('<span> </span>').show(); listFormatInit(); return imgSwitch_click(); } }), 1000); }; $(function() { init(); $('#boards-drawer').on('click', '.js-open-board', function() { return init(); }); return $('#content').on('click', '.js-react-root a.board-title', function() { return init(); }); }); }).call(this);