forked from YunChenqwq/Genshin_Start.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
67 lines (56 loc) · 2.39 KB
/
index.html
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
66
67
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>域名已转移</title>
<h2 align="center">域名已转移,点击跳转新域名</h2>
<link rel="shortcut icon" href="https://pic.imgdb.cn/item/6692e0edd9c307b7e9d99261.jpg" type="image/x-icon">
<link rel="stylesheet" href="./Genshin/style.css">
</head>
<body>
<div class="load">
<img src="./Genshin/OP_s.png">
</div>
<audio src="./Genshin/menchan.mp3"></audio>
<script src="https://cdn.staticfile.org/sweetalert/2.1.2/sweetalert.min.js"></script>
<script>
const openGenshinImpact = time => {
setTimeout(() => {
const audio = document.querySelector('audio')
const load = document.querySelector('.load')
load.classList.add('activate')
audio.play()
audio.addEventListener('ended', () => {
audio.src = "./Genshin/OPGo.mp3";
audio.play();
audio.addEventListener('ended', () => {
audio.pause(); // 播放结束后立即停止播放
window.location.href = "https://www.bilibili.com/video/BV1GJ411x7h7/";
});
});
}, time);
}
document.addEventListener('DOMContentLoaded', () => {
const startButton = document.querySelector('.load');
const hintText = document.querySelector('h2');
startButton.addEventListener('click', () => {
hintText.style.display = 'none'; // 点击屏幕后隐藏提示字符串
openGenshinImpact(0);
launchFullscreen(document.documentElement); // 点击屏幕后全屏显示
});
});
function launchFullscreen(element) {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
</script>
</body>
</html>