Skip to content

Instantly share code, notes, and snippets.

@Odepax
Last active December 26, 2020 23:48
Show Gist options
  • Save Odepax/f3468b6fed0128d04018755d03d81bf8 to your computer and use it in GitHub Desktop.
Save Odepax/f3468b6fed0128d04018755d03d81bf8 to your computer and use it in GitHub Desktop.
Diep.io crosshair cursor
// I use this to force the cursor to be a crosshair in diep.io as I think it's better for aiming than the arrow cursor.
// Just copy and paste this code snippet bellow in the browser console.
// The need for checking every 20s comes from the fact that the cursor is reset when hovering buttons (e.g. tank upgrade buttons).
// Cheking every 20s is quite smooth and does not decrease the game's performances.
// Alternatively, it's possible to opt for "move" instead of "crosshair" to get a fatter cross.
setInterval(function () {
if (document.getElementById("canvas").style.cursor != "crosshair")
document.getElementById("canvas").style.cursor = "crosshair"
}, 20000)
@Marklanchvar32
Copy link

let me test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment