Flowgame.io Nickname Color!

Have fun! Read the code instructions carefully

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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)
})();