Indicator

Indicator of mouse toggled on/off for evades.io

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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();
})();