Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Cytube Color Names
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://cytu.be/r/*
- // @grant none
- // ==/UserScript==
- const colors = {
- "trashbyte": "#ff00aa",
- "Valfreyja": "#ffaaaa",
- "Gappy": "#2ecc71",
- "Clocks": "#127000",
- "Kasran": "#5c5caa",
- "VoxSomniator": "#c4b7fa",
- "Emiable": "#76c8b9",
- "NotGyro": "#2261f7",
- "Forgebold": "#E67E22"
- };
- (function() {
- 'use strict';
- let update_names = function() {
- let usernames = document.querySelectorAll(".username");
- for (const elem of usernames) {
- for (const [user, color] of Object.entries(colors)) {
- if (elem.innerText === user+": ") {
- elem.style.color = color;
- }
- }
- }
- };
- let update_userlist = function() {
- let usernames = document.querySelectorAll("#userlist .userlist_op");
- for (const elem of usernames) {
- for (const [user, color] of Object.entries(colors)) {
- if (elem.innerText === user) {
- elem.style.cssText = `color: ${color} !important`;
- }
- }
- }
- };
- setInterval(update_names, 100);
- setInterval(update_userlist, 1000);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement