Flowgame.io Nickname Color!

Have fun! Read the code instructions carefully

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Flowgame.io Nickname Color!
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Have fun! Read the code instructions carefully
// @author       SakuroProCoder :D
// @match        *://*.flowgame.io/*
// @match        *://*.flowy.gg/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=flowgame.io
// @grant        document-start
// ==/UserScript==

if (window.flowExtensions) {
  window.flowExtensions.register('https://greasyfork.org/en/scripts/442523-flowgame-io-nickname-color');
}
(function() {
    var Properties = {
        SCRIPT_CONFIG: {
            NAME_COLOR: "turquoise", // the color, which the target name should be changed to
        },
        MENU_CONFIG: {

            COLOR_1: "#00FFF0", // you can use color codes, rgba, hsl, rgb or just color names.
        },
    }
    function changebackgroundcolor() {

        $('.fade-box').css({
            background: 'linear-gradient(to right bottom,hsl('+Properties.COLOR_HUE+', 50%, 50%),hsl('+Properties.COLOR_HUE2+', 50%, 50%)'
        })
    }
    var { fillText } = CanvasRenderingContext2D.prototype;
    CanvasRenderingContext2D.prototype.fillText = function(text, x, y) {
        let localstorage = Properties.SCRIPT_CONFIG
        if(text == document.getElementById("nickname").value) {
            this.fillStyle = localstorage.NAME_COLOR;
        }
        fillText.call(this, ...arguments);
    }
    document.addEventListener("DOMContentLoaded", ready)
})();