Indicator

Indicator of mouse toggled on/off for evades.io

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Indicator
// @namespace    https://evades.io/
// @version      1.0
// @description  Indicator of mouse toggled on/off for evades.io
// @match        https://evades.io/
// @grant        none
// @license MIT
// @icon         https://media.discordapp.net/attachments/1117429086403440680/1140702670185836624/I_iamge.png?width=454&height=454
// ==/UserScript==

(function() {
  'use strict';

  let clickCount = 0;
  let indicatorColor = "red";
  let indicatorElement;

  function createIndicator() {
    indicatorElement = document.createElement("div");
    indicatorElement.style.width = "17px";
    indicatorElement.style.height = "17px";
    indicatorElement.style.position = "fixed";
    indicatorElement.style.bottom = "0";
    indicatorElement.style.right = "0";
    indicatorElement.style.backgroundColor = indicatorColor;
    document.body.appendChild(indicatorElement);
  }

  function updateIndicatorColor() {
    if (clickCount % 2 === 0) {
      indicatorColor = "red";
    } else {
      indicatorColor = "green";
    }
    indicatorElement.style.backgroundColor = indicatorColor;
  }

  function handleClick() {
    clickCount++;
    updateIndicatorColor();
  }

  function addClickListener() {
    const canvasElement = document.getElementById("canvas");
    if (canvasElement) {
      canvasElement.addEventListener("click", handleClick);
    }
  }

  createIndicator();
  addClickListener();
})();