tower-tag

hilight defrent color

  1. // ==UserScript==
  2. // @name tower-tag
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description hilight defrent color
  6. // @author jswh
  7. // @match https://tower.im/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. $(document).ready(function() {change();});
  13. $(document).on('DOMNodeInserted', function(e) {
  14. if(e.target.className == 'todos-all todos-view member-view' || e.target.className == 'todos-all todos-view list-view' || e.target.className == 'simple-filedrop') {
  15. change();
  16. }
  17. });
  18. function change() {
  19. $('.tag').each(function (i, tag) {
  20. $tag = $(tag);
  21. tagText = $tag.text();
  22. switch (tagText) {
  23. case 'block-header':
  24. $todo = $tag.closest('.todo');
  25. $todo.css({
  26. 'margin':'10px 0',
  27. 'text-align':'center'
  28. });
  29. $wrap = $tag.closest('.todo-wrap');
  30. $wrap.children('.simple-checkbox').hide();
  31. $wrap.children('.todo-detail').hide();
  32. $wrap.children('.todo-content').css({ 'color':'#333333'});
  33. $tag.hide();
  34. break;
  35. case 'bug':
  36. case 'BUG':
  37. $tag.removeClass('tag');
  38. $tag.css({
  39. 'background-color': '#fb93b8 !important',
  40. 'color': '#fff !important',
  41. 'padding': '0.1em 0.2em',
  42. 'vertical-align': '1px',
  43. 'font-size': '82%',
  44. 'font-weight': 'normal',
  45. 'border-radius': '2px'
  46. });
  47. break;
  48. default:
  49. break;
  50. }
  51.  
  52. });
  53. }
  54. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址