-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzw.html
More file actions
87 lines (80 loc) · 2.4 KB
/
zw.html
File metadata and controls
87 lines (80 loc) · 2.4 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<html>
<head>
<meta charset="utf-8">
<title>ZWSP</title>
<style>
body,
html {
background: #2c2f33 url(https://discordapp.com/assets/530280c4e76a27a6dd43c0ecabb96e7d.png) fixed;
}
* {
font-family: "Open Sans", sans-serif;
text-align: center;
color: #f5f5f5;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
h1 {
font-family: "Raleway", sans-serif;
margin: 5rem;
}
div {
width: 40%;
height: 150px;
background-color: #7289da;
text-align: center;
border-radius: 6px;
margin: auto;
cursor: pointer;
font-size: 72px;
font-weight: extra-bold;
transition: 2s;
}
</style>
</head>
<body>
<h1 style="text-align:center">Zero Width Space Copier</h1>
<div onclick="change();" stlye="display: table; overflow: hidden;">
<div style="display: table-cell; vertical-align: middle;" id="Change">
Zero Width Space
</div>
</div>
<script type="text/javascript" src="index.js"></script>
</body>
<script>
function change() {
copyStringToClipboard("");
var btn = document.getElementById("Change");
btn.style.transition = "0.12s ease-in-out";
btn.style.color = "#7289da";
sleep(300).then(() => {
btn.innerHTML = "Copied!";
btn.style.color = "white";
sleep(300).then(() => {
btn.style.color = "#7289da";
sleep(300).then(() => {
btn.style.color = "white";
btn.innerHTML = "Zero Width Space";
});
});
});
}
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function copyStringToClipboard(str) {
var el = document.createElement("textarea");
el.value = str;
el.setAttribute("readonly", "");
el.style = { position: "absolute", left: "-9999px" };
document.body.appendChild(el);
el.select();
document.execCommand("copy");
document.body.removeChild(el);
}
</script>
</html>