-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
36 lines (34 loc) · 903 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
/* Please stop trying to STEAL our SECRET source code for this innovative website! */
// Stop context menu
window.oncontextmenu = function (event) {
event.preventDefault();
event.stopPropagation();
return false;
};
// Change to yellow after time
const time = 2000; // Time until turns angry
var timer;
addEventListener("mousedown", () => {
timer = setTimeout(makeAngry, time);
});
addEventListener("touchstart", () => {
timer = setTimeout(makeAngry, time);
});
addEventListener("mouseup", () => {
clearTimeout(timer);
makeNotAngry();
});
addEventListener("touchend", () => {
clearTimeout(timer);
makeNotAngry();
});
addEventListener("touchcancel", () => {
clearTimeout(timer);
makeNotAngry();
});
function makeAngry() {
document.querySelector("main").className = "angry";
}
function makeNotAngry() {
document.querySelector("main").className = "";
}