-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.html
152 lines (152 loc) · 5.48 KB
/
dev.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="description" content="Say anything you want.">
<meta name="theme-color" content="#ffffff">
<meta name="og:title" content="Type anything.">
<meta name="og:description" content="Say anything you want.">
<meta name="og:image" itemprop="image" content="https://typeanything.ml/TypeAnything.png">
<link rel="icon" href="./default.png"/>
<title>Type Anything.</title>
<style>
body{
margin: 0;
padding: 0;
width: 100%;
background-color: aliceblue;
text-align: center;
}
#main{
margin-top: 42vh;
}
#main:focus-within #input{
padding-left: 24px;
box-shadow: 0 15px 30px #bbb;
}
#main:focus-within #submit{
box-shadow: 0 15px 30px #bbb;
}
.prompt{
transition: 0.2s ease;
box-shadow: 0 15px 60px #bbb;
font-size: 16px;
font-weight: bold;
}
#input{
box-sizing: border-box;
width: 500px;
max-width: 70%;
height: 70px;
padding-left: 20px;
background-color: #fff;
border: none;
border-radius: 12px 0 0 12px;
outline: none;
-webkit-appearance: none;
}
#submit{
width: 100px;
max-width: 20%;
height: 70px;
color: #fff;
background-color: #000;
border: none;
border-radius: 0 12px 12px 0;
outline: none;
cursor: pointer;
}
#tip{
color: transparent;
cursor: default;
}
@media screen and (max-width: 420px) {
#main{
margin-top: 36vh;
}
.prompt{
box-shadow: none;
font-size: 12px;
}
#input{
height: 60px;
}
#submit{
height: 60px;
}
}
</style>
</head>
<body>
<noscript>
Enable that fucking JavaScript you little sussy baka.
<br/>
As if that little extra "privacy" or "security" from disabling this feature really helps smh.
</noscript>
<div id="main">
<input id="input" class="prompt" type="text" placeholder="Say anything you want." autofocus/><button id="submit" class="prompt" onclick="button()">Button</button>
<p id="tip">No one is spying.</p>
</div>
<script>
if (!localStorage.getItem("color")){
const colors = ["f0f8ff","eeffff","ffeeff","ffffee","eeeeff","ffeeee","eeffee","eeeeee"];
localStorage.setItem("color", colors[parseInt(Math.random() * colors.length)]);
}
if (!localStorage.getItem("userID")){
localStorage.setItem("userID", parseInt(Math.random()*9000 + 1000));
}
const color = localStorage.getItem("color");
const userID = localStorage.getItem("userID");
document.body.style.backgroundColor = `#${color}`;
document.querySelector("link[rel=icon]").href = `https://ui-avatars.com/api/?size=32&name=TA&bold=true&font-size=0.6&background=${color}`;
document.querySelector("meta[name=theme-color]").content = `#${color}`;
const input = document.getElementById("input");
const submit = document.getElementById("submit");
const request = new XMLHttpRequest();
function button(){
let text = input.value;
if (!text) return;
if (text.includes("@everyone") || text.includes("@here")){
text = `${text.replaceAll("@", "*")}\n*System: Everyone/here ping detected. Replaced automatically.*`
}
const params = {
username: `${userID} TUID`,
avatar_url: `https://ui-avatars.com/api/?size=128&name=${userID}&length=4&font-size=0.36&bold=true&background=${color}`,
content: text
}
request.open("POST", "https://proxy.typeanything.ml/");
request.setRequestHeader("Content-type", "application/json");
request.send(JSON.stringify(params));
animation();
input.value = "";
input.focus();
}
function animation(){
submit.style.transition = "none";
submit.style.backgroundColor = "#eee";
submit.style.color = "#000";
submit.innerText = "Pressed!";
setTimeout(() => {
submit.style.transition = "0.5s ease";
submit.style.backgroundColor = "#000";
submit.style.color = "#fff";
setTimeout(() => {
submit.innerText= "Button";
}, 50);
}, 600);
}
document.onkeydown = event => {
if (event.keyCode == 13){
button();
}
if (event.keyCode == 191 && input !== document.activeElement){
event.preventDefault();
input.focus();
}
}
console.info("by Fengzi Lab.");
</script>
</body>
</html>