-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (48 loc) · 1.59 KB
/
index.html
File metadata and controls
53 lines (48 loc) · 1.59 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
<!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.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>