-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
46 lines (44 loc) · 826 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const cssCursors = [
'auto',
'default',
'none',
'context-menu',
'help',
'pointer',
'progress',
'wait',
'cell',
'crosshair',
'text',
'vertical-text',
'alias',
'copy',
'move',
'no-drop',
'not-allowed',
'grab',
'grabbing',
'all-scroll',
'col-resize',
'row-resize',
'n-resize',
'e-resize',
's-resize',
'w-resize',
'ne-resize',
'nw-resize',
'se-resize',
'sw-resize',
'ew-resize',
'ns-resize',
'nesw-resize',
'nwse-resize',
'zoom-in',
'zoom-out'
];
let cursorIndex = 0;
function changeCursor() {
document.body.style.cursor = cssCursors[cursorIndex];
cursorIndex = Math.floor(Math.random() * 35) + 1;
}
setInterval(changeCursor, 100);