Last active
December 26, 2020 23:48
-
-
Save Odepax/f3468b6fed0128d04018755d03d81bf8 to your computer and use it in GitHub Desktop.
Diep.io crosshair cursor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let me test it