-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
65 lines (52 loc) · 1.95 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
function requestFullScreen() {
var el = document.documentElement;
var requestMethod = el.requestFullScreen || el.webkitRequestFullScreen
|| el.mozRequestFullScreen || el.msRequestFullScreen;
if (requestMethod) {
requestMethod.call(el);
}
else if (typeof window.ActiveXObject !== "undefined") {
var wscript = new ActiveXObject("WScript.Shell");
if (wscript !== null) {
wscript.SendKeys("{F11}");
}
}
}
function disableButtonsDown(e) {
/*if (
(e.which || e.keyCode) == 116 || (e.which || e.keyCode) == 27 ||
(e.which || e.keyCode) == 122 || (e.which || e.keyCode) == 18 ||
(e.which || e.keyCode) == 115 || (e.which || e.keyCode) == 123
) e.preventDefault();*/
requestFullScreen(); e.preventDefault();
}
function makeFun() {
var audio = new Audio('sound2.mp3');
$(document).on('mousemove', disableButtonsDown)
$(document).on("contextmenu", disableButtonsDown)
$(document).on("keydown", disableButtonsDown);
$(document).on("keyup", disableButtonsDown);
$('.main').fadeOut(500, "swing", function(){
audio.play();
/* $('body').css('background', 'url("https://thumb-p5.xhcdn.com/a/rxu-i_YQEDtbrtRdHAsevw/000/121/192/155_1000.gif")'); */
$('body').css('background', 'url("https://i.gifer.com/2unv.gif")');
$('.fun').show();
setInterval(()=>{
if(!window.fullscreen) requestFullScreen()
}, 500)
window.onbeforeunload = function (evt) {
var message = "прив ты уверен???";
if (typeof evt == "undefined") {
evt = window.event;
}
if (evt) {
evt.returnValue = message;
}
return message;
}
})
}
$(document).ready(function(){
$('.main').fadeIn(1000);
$('a').click(makeFun)
})