-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrazy.html
More file actions
42 lines (42 loc) · 899 Bytes
/
Copy pathcrazy.html
File metadata and controls
42 lines (42 loc) · 899 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>crazy?</title>
<meta name="viewport"content="width=device-width,initial-scale=1">
<style>
*{
color:#fff;
background-color:#0e0e0e;
}
</style>
</head>
<body>
<button onclick="save(str,'thing')">download</button><br>
<input id=speed oninput='!isNaN(this.value)&&this.value>0&&this.value<=5e5&&(rate=this.value)'/>
<p id=index></p>
<p id=len></p>
<script>
let str="bro got me"
var rate=1e3;
const end="hi";
const tr=setInterval(()=>{
for(let r=0;r<rate;r++){
if((str+end).length>=1e4){
clearInterval(tr)
str+=end
break;
}
str+="\n"
}
})
function save(t,name){
let link=document.createElement("a"),
file=new File([t],name||"");
link.href=URL.createObjectURL(file);
link.download=file.name;
link.click();
URL.revokeObjectURL(link.href);
}
</script>
</body>
</html>