您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Apply dark theme to your private repository pages on Github
- // ==UserScript==
- // @name GitHub apply dark theme on private repo
- // @namespace https://github.com/benok/
- // @description Apply dark theme to your private repository pages on Github
- // @include https://github.com/*
- // @version 2022.01.31.0
- // @homepage https://gist.github.com/benok/301f7a9667a598202f10111af054ae77
- // @author benok
- // @grant none
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- if (document.querySelector('span.Label.Label--secondary').textContent == "Private") {
- document.querySelector('html').setAttribute('data-color-mode', 'dark');
- }
- })();