-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (38 loc) · 1.23 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Clippy</title>
<link rel="stylesheet" href="assets/css/index.css">
<script src="libs/js/jquery/jquery-1.7.min.js"></script>
<link rel="stylesheet" type="text/css" href="libs/js/clippy/build/clippy.css" media="all">
<script src="libs/js/clippy/build/clippy.min.js"></script>
<link rel="icon" href="assets/icon/icon.png" type="image/png">
</head>
<body>
<button id="close-btn" class="close"></button>
<script>
let longPressTimeout;
document.querySelector("body").addEventListener('mousedown', function(event) {
longPressTimeout = setTimeout(function() {
document.querySelector("#close-btn").style.display = "block";
}, 1000);
});
document.querySelector("body").addEventListener('mouseup', function(event) {
clearTimeout(longPressTimeout);
});
</script>
<script>
clippy.load();
clippy.load('Clippy', function(agent){
agent.moveTo(0,0);
agent.show();
agent._startDrag = ()=>{}
agent._onMouseDown = ()=>{}
agent._el.on('click', ()=>{
agent.animate();
});
});
</script>
</body>
</html>