Flarex gold nick blinker(customizable)

gold nick name flicker for flarex

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Flarex gold nick blinker(customizable)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  gold nick name flicker for flarex
// @author       Vaqu
// @match        https://flarex.fun/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let isGoldEnabled = true;
    let blinkInterval = 59; // Blink interval in milliseconds

    function toggleGoldNickname() {
        isGoldEnabled = !isGoldEnabled;
        let goldCheckbox = document.querySelector('#goldNick.save');
        /* copy and paste goldCheckBox, change "gold" to the color of your nick, right click on the nickname checkbox, copy the id, and replace '#goldNick.save' with the id.*/
        if (goldCheckbox) {
            goldCheckbox.checked = isGoldEnabled;
            goldCheckbox.dispatchEvent(new Event('change'));
        }/* copy and paste the text above ^^ and change every "goldCheckBox" with your new id*/
    }

    let blinker = setInterval(toggleGoldNickname, blinkInterval);
/* add the variable to the "setInterval" text*/
    // adding a stop button
    let stopButton = document.createElement('button');
    stopButton.innerText = 'Stop Blinking';
    stopButton.style.position = 'fixed';
    stopButton.style.top = '10px';
    stopButton.style.right = '10px';
    stopButton.style.zIndex = '9999';
    stopButton.onclick = function() {
        clearGoldNick()
    };
    function clearGoldNick() {
    clearInterval(blinker);
        blinker = false;
    }
    document.body.appendChild(stopButton);
    // adding a start button
        let startButton = document.createElement('button');
    startButton.innerText = 'Start Blinking';
    startButton.style.position = 'fixed';
    startButton.style.top = '50px';
    startButton.style.right = '10px';
    startButton.style.zIndex = '9999';
    startButton.onclick = function() {
         var blinker = setInterval(toggleGoldNickname, blinkInterval);
    };
    document.body.appendChild(stopButton);
    console.log("Script started ;D")
    if(blinker = false) {
        toggle.startButton();
    }

})();