您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
23/01/2025, 12:23:20
- // ==UserScript==
- // @name Github: reduce title opacity of PRs with a specific label
- // @namespace Violentmonkey Scripts
- // @match https://github.com/navikt/aksel/pulls*
- // @grant none
- // @version 1.2
- // @author popular-software
- // @description 23/01/2025, 12:23:20
- // @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
- // @run-at document-end
- // @license MIT
- // ==/UserScript==
- const LABEL_TO_DIM = "On hold :pause_button:";
- const ONLY_DIM_TITLE = false;
- const disconnect = VM.observe(document.body, () => {
- const nodes = document.body.querySelectorAll(`div.flex-auto:has(.Link--primary):has(a[data-name="${LABEL_TO_DIM}"])`);
- for (let node of nodes) {
- if (ONLY_DIM_TITLE) {
- const title = node.querySelector('a');
- title.style = "opacity: 0.2;";
- }
- else {
- node.style = "opacity: 0.2; font-size: 10px;";
- }
- }
- });
- // You can also disconnect the observer explicitly when it's not used any more
- // disconnect();