// ==UserScript== // @name Leaderboard Username Highlighter // @namespace http://tampermonkey.net/ // @version 1.0 // @description Highlight specific usernames with rainbow colors and add AKA labels // @author You // @match https://cyberskyline.com/world/* // @grant none // ==/UserScript== (function() { 'use strict'; // Username mappings const userMappings = { 'cu_taciturnaxolotl': 'Kieran Klukas', 'DF Omen': 'Daniel Frank', 'cu_noxe': "Ben Mast", 'cu_cL4UDIOS': "Will Guido", 'CU_Kroma': "Soren Brumbach", 'cu_JoshuaCordova': 'Joshua Cordova', 'cu_RetiredCapybara': 'Josh Hochstedler', }; // Teal and Orange color palette (expanded) const colors = [ '#662400', // Dark Brown-Orange '#B33F00', // Burnt Orange '#FF6B1A', // Bright Orange '#006663', // Deep Teal '#00B3AD', // Bright Teal '#8B2E00', // Rusty Orange '#FF8533', // Light Orange '#FFA04D', // Peach Orange '#004D4A', // Dark Teal '#008F8A', // Medium Teal '#00D4CC', // Cyan Teal '#4D1F00', // Very Dark Orange '#E05500', // Medium Orange '#FF9B66', // Soft Orange '#003330', // Very Dark Teal '#00665F', // Dark-Medium Teal '#1AFFEC', // Light Cyan '#994400', // Terracotta '#CC5500', // Burnt Sienna '#00998F', // Jade Teal ]; // Shuffle colors to ensure variety function shuffleArray(array) { const shuffled = [...array]; for (let i = shuffled.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]]; } return shuffled; } const shuffledColors = shuffleArray(colors); let colorIndex = 0; // Store colors for each user to keep them consistent and unique const userColors = {}; Object.keys(userMappings).forEach(username => { if (!userColors[username]) { userColors[username] = shuffledColors[colorIndex % shuffledColors.length]; colorIndex++; } }); // Function to highlight usernames function highlightUsernames() { // Find all table cells that might contain usernames const cells = document.querySelectorAll('td'); cells.forEach(cell => { const text = cell.textContent.trim(); // Check if this cell contains one of our target usernames if (userMappings.hasOwnProperty(text)) { const aka = userMappings[text]; const color = userColors[text]; // Apply styling cell.style.backgroundColor = color; cell.style.color = 'white'; cell.style.fontWeight = 'bold'; cell.style.padding = '5px'; cell.style.borderRadius = '3px'; // Force white color on all child elements (including gradient spans) const allChildren = cell.querySelectorAll('*'); allChildren.forEach(child => { child.style.color = 'white'; }); // Add AKA label if not already added if (!cell.querySelector('.aka-label')) { const akaSpan = document.createElement('span'); akaSpan.className = 'aka-label'; akaSpan.textContent = ` (AKA ${aka})`; akaSpan.style.fontSize = '0.9em'; akaSpan.style.fontStyle = 'italic'; akaSpan.style.color = 'white'; cell.appendChild(akaSpan); } } }); } // Run on page load highlightUsernames(); // Watch for dynamic content changes const observer = new MutationObserver(highlightUsernames); observer.observe(document.body, { childList: true, subtree: true }); })();