您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Change theme to dark mode on telegra.ph
// ==UserScript== // @name Telegra.ph Dark Mode // @namespace http://tampermonkey.net/ // @version 1.1 // @description Change theme to dark mode on telegra.ph // @author YourName // @match https://telegra.ph/* // @grant none // ==/UserScript== (function() { 'use strict'; const darkBackgroundColor = '#121212'; const darkTextColor = '#E0E0E0'; document.body.style.backgroundColor = darkBackgroundColor; document.body.style.color = darkTextColor; const elements = document.querySelectorAll('p, h1, h2, h3, h4, h5, h6, a, span, div, blockquote'); elements.forEach(element => { const computedStyle = window.getComputedStyle(element); if (computedStyle.backgroundColor === 'rgba(0, 0, 0, 0)') { element.style.backgroundColor = darkBackgroundColor; } element.style.color = darkTextColor; }); })();