Indicator

Indicator of mouse toggled on/off for evades.io

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

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