领歌深色主题

暗金色主题,、隐藏多余组件

// ==UserScript==
// @name         领歌深色主题
// @namespace    https://github.com/pcy190/TamperMonkeyScript
// @version      1.6
// @description  暗金色主题,、隐藏多余组件
// @author       lnwazg
// @match        https://www.leangoo.com/kanban/board/*
// @grant        none
// @license      GPL-2.0-only
// ==/UserScript==

function filterCSSRules(selectorText) {
  let rules = document.styleSheets[0].cssRules;
  let matchedRules = [];
  for (let i=0; i<rules.length; i++) {
    let rule = rules[i];
    if (rule.selectorText === selectorText) {
      matchedRules.push(rule);
    }
  }
  return matchedRules;
}

document.body.style.backgroundColor="black";

//全局修改样式
filterCSSRules(".list_name").forEach(e => {
    e.style.color ="#10B910";
});
filterCSSRules(".list-header .list-title-div").forEach(e => {
    e.style.backgroundColor ="black";
});
filterCSSRules(".task_view").forEach(e => {
    e.style.backgroundColor ="black";
});
filterCSSRules(".task-name-content").forEach(e => {
    e.style.backgroundColor ="black";
    e.style.color ="#F0B27A";
});

filterCSSRules(".btn-default").forEach(e => {
    e.style.backgroundColor ="black";
     e.style.color ="darksalmon";
});

filterCSSRules(".btnEditTaskSlide").forEach(e => {
    e.style.color ="darksalmon";
});

//替换左上角的logo
document.querySelector(".navbar-logo").src = "https://www.leangoo.com/wp-content/uploads/2023/03/%E5%B7%A5%E4%BD%9C%E5%8F%B0.png"

//隐藏团队切换标识
document.querySelector("#ent_list_button").style.display="none";