GitHub add some blue

2/10/2025, 3:46:00 PM

当前为 2025-02-10 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        GitHub add some blue
// @namespace   Violentmonkey Scripts
// @match       https://github.com/*
// @match       https://*.github.com/*
// @grant       GM_addStyle
// @run-at      document-start
// @license     MIT
// @version     1.0.1
// @author      Mops
// @icon        https://github.githubassets.com/favicons/favicon-dark.png
// @description 2/10/2025, 3:46:00 PM
// ==/UserScript==
GM_addStyle(`

/* All primary-themed buttons should be blue*/
html:is([data-color-mode="dark"][data-dark-theme="dark"],
[data-color-mode="dark"][data-dark-theme="dark"] ::backdrop,
[data-color-mode="auto"][data-light-theme="dark"],
[data-color-mode="auto"][data-light-theme="dark"] ::backdrop) {
  --button-primary-bgColor-rest: var(--bgColor-accent-emphasis);
  --button-primary-bgColor-active: #3685f3;
  --button-primary-bgColor-hover: #2a7aef;
  --button-primary-bgColor-disabled: #2f5080;
  --button-primary-borderColor-disabled: #35598f;
  --button-primary-borderColor-rest: var(--borderColor-accent-emphasis);
}

/* (Latest) pill and other success-themed pills */
.Label.Label--success,

/* (Preview) pill */
:where(.prc-Label-Label--LG6X):where([data-variant=success])
{
    border-color: var(--borderColor-accent-emphasis);
    color: var(--fgColor-accent);
}
`);