Crosshair Cursor

Change the default cursor to crosshair in Diep.io

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

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.

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

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

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         Crosshair Cursor
// @namespace    https://github.com/No-Eul
// @version      1.0
// @description  Change the default cursor to crosshair in Diep.io
// @author       NoEul
// @license      MIT License - https://github.com/No-Eul/scripts/raw/master/LICENSE.txt
// @source       https://github.com/No-Eul/scripts
// @supportURL   https://github.com/No-Eul/scripts/issues
// @match        *://diep.io/*
// @icon         https://diep.io/favicon.ico
// ==/UserScript==

(() => {
	let canvas = document.getElementById("canvas");
	canvas.style.setProperty("cursor", "crosshair");
	let observer = new MutationObserver(mutations => {
		if (canvas.style.getPropertyValue("cursor") === "default")
			canvas.style.setProperty("cursor", "crosshair");
	});
	observer.observe(canvas, {attributes: true, attributeFilter: ["style"]});
})();