-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstupid.html
54 lines (54 loc) · 2.36 KB
/
stupid.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="X0lotl" />
<link rel="manifest" href="/site.webmanifest" />
</head>
<body>
<h1>Bad phone slider</h1>
<p>This is a simple slider where you enter a phone number.</p>
<small>Don't enter your real phone number. I don't collect the data, and this is an https site, but still.</small>
<form>
<label for="num">Input phone number</label>
<input type="range" value="5000000000" id="num" name="slider" min="0" max="9999999999" oninput="slide()">
<script>
function slide(num = document.getElementById("num").value,change = true) {
let x = num.toString().padStart(10,"0");
let y = x.slice(0,3);
let z = "(";
z = z + y + ")-";
y = x.slice(3,6);
z = z + y + "-";
y = x.slice(6,10);
z = z + y;
if(change) {
document.getElementById("num").value = num;
document.getElementById("bob").value = z
}
return z
}
function slideRand() {
let x = Math.floor(Math.random() * 9999999999)
let y = slide(x,false)
while (true) {
if(confirm("Is "+ y + " your phone number? OK for yes, Cancel for no.")) {
alert("Nice.")
} else {
alert("Please contact your provider to change your phone number.")
continue
}
break
}
}
</script>
<output id="bob">(500)-000-0000</output> <br>
<button onclick="slideRand()">Random!</button>
<input type="submit" value="Submit">
</form>
</body>
</html>