您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change font size to 20px for Chat History
// ==UserScript== // @name Milky Way Idle - Chat History Font Size Increaser // @namespace http://www.milkywayidle.com/ // @version 1.0 // @description Change font size to 20px for Chat History // @author physon // @match https://www.milkywayidle.com/* // @match https://test.milkywayidle.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Function to apply font size changes function changeFontSize() { const chatHistoryDivs = document.querySelectorAll('.ChatHistory_chatHistory__1EiG3'); chatHistoryDivs.forEach(div => { div.style.fontSize = '18px'; div.style.lineHeight = '28px'; }); const characterNameDivs = document.querySelectorAll('.CharacterName_characterName__2FqyZ'); characterNameDivs.forEach(div => { div.style.fontSize = '18px'; div.style.lineHeight = '28px'; }); } // Apply changes immediately changeFontSize(); // Watch for dynamically added content const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'childList') { changeFontSize(); } }); }); // Start observing observer.observe(document.body, { childList: true, subtree: true }); })();