-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheasy.html
More file actions
56 lines (51 loc) · 2.23 KB
/
easy.html
File metadata and controls
56 lines (51 loc) · 2.23 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<title>Window Blur Alert</title>
</head>
<body>
<div class="background-grid"></div>
<span class="background-gradient"></span>
<div class="container">
<h1>您的翻译器能否通过<b>切屏检测</b>?</h1>
<div class="line"></div>
<p>众所周知,NZQA会检测您在考试过程中是否切出页面</p>
<p>基于此,我制作了一个模拟检测的网站</p>
<p>它可以判断在什么情况下您会被检测出切屏</p>
<p>不同的是,您在此处测试不会影响到您的成绩 :D</p>
<div style="height:30px"></div>
<p>这里提供了一些句子以供您测试您的翻译器插件</p>
<p class="text">Hello, my name is <b>Tom</b>.</p>
<p class="text">This is an apple. I like apples. Apples are good for our health.</p>
<p>如果你认为这太简单了,不妨<a style="color:#ff6969" href="strict.html">试试严格模式</a></p>
<button class="reset" id="status" onclick="reset()">当前未检测到切屏</button>
</div>
<div class="footer-text">
Made By DiamondPie | 已在 <a href="https://github.com/DiamondPie/DetectClipOut">Github</a> 开源
</div>
<script color="255,255,255", opaticy="0.7", zIndex="-1", count="99", src="js/dynamic-line.js"></script>
</body>
<script>
const status = document.getElementById('status');
var lostFocus = false;
function detectedClipOut() {
if (lostFocus) return;
status.classList.add('detected');
status.innerText = '检测到切屏,点击此按钮以重置';
lostFocus = true;
}
function reset() {
status.classList.remove('detected');
status.innerText = '当前未检测到切屏';
lostFocus = false;
}
// 监听窗口失去焦点事件
document.onblur = window.onblur = detectedClipOut;
// document.onmouseleave = window.onmouseleave = detectedClipOut;
window.addEventListener('blur', detectedClipOut);
window.addEventListener('visibilitychange', detectedClipOut)
</script>
</html>