-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpair.html
172 lines (161 loc) Β· 5.77 KB
/
pair.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>π©π³π¨πͺπ² π·π¨π΅π»π―π¬πΉ πΊπ¬πΊπΊπ°πΆπ΅ π¨π·π·</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: url("https://telegra.ph/file/5a7ae6fd49410bcafe81a.jpg"); /* set the background image */
font-family: Arial, sans-serif;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.box {
width: 300px;
height: 330px;
padding: 20px;
position: relative;
text-align: center;
background-image: url("https://telegra.ph/file/2be2a434de6dd1fbd44b7.jpg"); /* set the background image */
border-radius: 10px;
transform: perspective(1000px) rotateY(0deg);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
position: relative;
}
#text {
color: #fff; /* Set the text color to white */
}
.input-container {
display: flex;
background: linear-gradient(45deg, #007bff 0%, #32CD32 100%); /* Blue and green gradient background */
border-radius: 1rem;
padding: 0.3rem;
gap: 0.3rem;
max-width: 300px; /* Set your desired maximum width */
width: 100%;
}
.input-container input {
border-radius: 0.8rem 0 0 0.8rem;
background: #fff; /* White input background */
color: #000; /* Set the text color to black */
border: none;
border-left: 2px solid #007bff; /* Blue border on the left */
width: 89%;
flex-basis: 75%;
padding: 1rem;
transition: all 0.2s ease-in-out;
}
.input-container input:focus {
border-left: 2px solid #32CD32; /* Green border on focus */
outline: none;
}
.input-container button {
flex-basis: 25%;
padding: 1rem;
background: linear-gradient(135deg, #32CD32 0%, #007bff 100%); /* Green and blue gradient background */
font-weight: 900;
letter-spacing: 0.3rem;
text-transform: uppercase;
color: #fff; /* White text color */
border: none;
width: 100%;
border-radius: 0 1rem 1rem 0;
transition: all 0.2s ease-in-out;
}
.input-container button:hover {
background: linear-gradient(135deg, #007bff 0%, #32CD32 100%); /* Blue and green gradient on hover */
}
.centered-text {
color: #fff; /* Set the text color to white */
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="main">
<div class="box" id="box">
<div id="text">
<i class="fa fa-user"></i>
<p>
<h3 class="centered-text">π©π³π¨πͺπ² π·π¨π΅π»π―π¬πΉ πΊπ¬πΊπΊπ°πΆπ΅ π¨π·π· </h3>
<br>
<h6 class="centered-text">Enter Your Whatsapp Number With Country Code Without (+).</h6>
<h6 class="centered-text">ππππ ππ πππππππ πππππ</h6>
<div class="input-container">
<input placeholder="Eg 25471077266" type="number" id="number" placeholder="Enter Your Whatsapp Number With Country Code Without (+)." name="">
<button id="submit">Enter</button>
</div>
<a id="waiting-message" class="centered-text" style="display: none;">Getting Code...</a>
<br>
<br>
<main id="pair"></main>
</p>
</div>
</div>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.0.0-alpha.1/axios.min.js"
></script>
<script>
let a = document.getElementById("pair");
let b = document.getElementById("submit");
let c = document.getElementById("number");
let box = document.getElementById("box");
async function Copy() {
let text = document.getElementById("copy").innerText;
let obj = document.getElementById("copy");
await navigator.clipboard.writeText(obj.innerText.replace('YOUR CODE: ', ''));
obj.innerText = "COPIED";
obj.style = "color: blue; font-weight: bold";
obj.size = "5";
setTimeout(() => {
obj.innerText = text;
obj.style = "color: blue; font-weight: bold";
obj.size = "5";
}, 500);
}
b.addEventListener("click", async (e) => {
e.preventDefault();
if (!c.value) {
a.innerHTML = '<a style="color: red; font-weight: bold;">Enter Your Whatsapp Number With Country Code Without (+).</a><br><br>';
} else if (c.value.replace(/[^0-9]/g, "").length < 11) {
a.innerHTML = '<a style="color: red; font-weight: bold;">Invalid Number Format</a><br><br>';
} else {
const bc = c.value.replace(/[^0-9]/g, "");
let bb = "";
let bbc = "";
const cc = bc.split('');
cc.map(a => {
bbc += a;
if (bbc.length == 3) {
bb += " " + a;
} else if (bbc.length == 8) {
bb += " " + a;
} else {
bb += a;
}
});
c.type = "text";
c.value = "+" + bb;
c.style = "color: black; font-size: 20px";
a.innerHTML = '<a style="color: white; font-weight: bold;">Generating Code...</a><br><br>';
let { data } = await axios(`/code?number=${bc}`);
let code = data.code || "Service is Currently Unavailable";
a.innerHTML = '<font id="copy" onclick="Copy()" style="color: blue; font-weight: bold;" size="5">YOUR CODE: <span style="color: yellow; font-weight: bold;">' + code + '</span></font><br><br><br>';
}
});
</script>
</body>
</html>