您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highlight words with rarity based on difficulty when dragged out of the panel
当前为
// ==UserScript== // @name Infinite Craft Rarity Highlighter // @namespace http://tampermonkey.net/ // @version 2.0 // @description Highlight words with rarity based on difficulty when dragged out of the panel // @author carbonara crab // @license MIT // @match https://neal.fun/infinite-craft/ // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; function getRarity(textLength) { if (textLength <= 30) return 'common'; if (textLength <= 55) return 'uncommon'; if (textLength <= 69) return 'rare'; if (textLength <= 92) return 'epic'; if (textLength <= 120) return 'legendary'; return 'exotic'; } function getColor(rarity) { const colors = { common: 'white', uncommon: 'lightgreen', rare: 'cornflowerblue', epic: 'plum', legendary: 'gold', exotic: 'cyan' }; return colors[rarity] || 'black'; } function highlightElement(element) { const textContent = element.textContent.trim(); if (textContent) { const rarity = getRarity(textContent.length); element.style.color = getColor(rarity); } } const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach((node) => { if (node.nodeType === Node.ELEMENT_NODE && node.classList.contains('instance')) { highlightElement(node); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址