Greasy Fork 支持简体中文。

Trello - hide annoying card badges

Hide card badges for watching, comments and description. {Modified "Trello Improved" script by Skilling to only hide badges}

  1. // ==UserScript==
  2. // @name Trello - hide annoying card badges
  3. // @description Hide card badges for watching, comments and description. {Modified "Trello Improved" script by Skilling to only hide badges}
  4. // @author kms
  5. // @version 0.1.2
  6. // @match https://trello.com/*
  7. // @grant none
  8. // @namespace https://greasyfork.org/users/2465
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. $(`
  15. <style>
  16. * {
  17. -webkit-font-smoothing: antialiased;
  18. }
  19. .badges .badge[title="You are watching this card."],
  20. .badges .badge[title="You are subscribed to this card."],
  21. .badges .badge[title="This card has a description."],
  22. .badges .badge[title="Comments"],
  23. .badges .badge[title="Attachments"],
  24. .badges .badge[title="Trello attachments"],
  25. .badges .badge .icon-sm {
  26. display: none;
  27. }
  28. .canonical-card > div > a > div:nth-child(3),
  29. .canonical-card > div > a > div:nth-child(4) {
  30. display: none;
  31. }
  32. </style>
  33. `).appendTo('head');
  34.  
  35. var tweakCardBadge = function(badge) {
  36. var value = badge.innerHTML.split(': ');
  37.  
  38. if (value[1]) {
  39. badge.innerHTML = value[1];
  40. }
  41. };
  42.  
  43. setInterval(function() {
  44. document.querySelectorAll('.custom-field-front-badges .badge .badge-text').forEach(tweakCardBadge);
  45. }, 500);
  46. })();