DmitrMakeev commited on
Commit
95671ea
1 Parent(s): 511c45a

Update ver.html

Browse files
Files changed (1) hide show
  1. ver.html +75 -3
ver.html CHANGED
@@ -4,8 +4,72 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Phone Verification</title>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  </head>
8
  <body>
 
 
 
 
 
 
9
  <input type="file" id="fileInput" accept=".txt">
10
  <button id="verifyButton">Verify Phones</button>
11
  <a id="downloadLink" style="display: none;">Download Verified Phones</a>
@@ -29,8 +93,12 @@
29
  });
30
 
31
  async function verifyPhones(phones, delay) {
 
 
 
32
  const verifiedPhones = [];
33
- for (let i = 0; i < phones.length; i++) {
 
34
  const phone = phones[i];
35
  try {
36
  const response = await fetch('https://api.green-api.com/waInstance1101952913/checkWhatsapp/fb4986a9d9cb40ef9be6c7b08cb9c98b7a3b1dc8c6834b0b92', {
@@ -51,7 +119,11 @@
51
  console.error(`Error verifying phone ${phone}:`, error);
52
  }
53
 
54
- if (i < phones.length - 1) {
 
 
 
 
55
  await new Promise(resolve => setTimeout(resolve, delay));
56
  }
57
  }
@@ -62,7 +134,7 @@
62
  const downloadLink = document.getElementById('downloadLink');
63
  downloadLink.href = url;
64
  downloadLink.download = 'verified_phones.txt';
65
- downloadLink.style.display = 'block';
66
  }
67
  </script>
68
  </body>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Phone Verification</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ text-align: center;
11
+ background-color: #f0f0f0;
12
+ margin: 0;
13
+ padding: 0;
14
+ }
15
+ h1 {
16
+ background-color: #4CAF50;
17
+ color: white;
18
+ padding: 20px;
19
+ margin: 0;
20
+ border-bottom: 2px solid #388E3C;
21
+ }
22
+ #progressBarContainer {
23
+ width: 80%;
24
+ margin: 20px auto;
25
+ }
26
+ #progressBar {
27
+ width: 100%;
28
+ background-color: #ddd;
29
+ }
30
+ #progress {
31
+ width: 0%;
32
+ height: 30px;
33
+ background-color: #4CAF50;
34
+ text-align: center;
35
+ line-height: 30px;
36
+ color: white;
37
+ }
38
+ #fileInput, #verifyButton {
39
+ margin-top: 20px;
40
+ padding: 10px 20px;
41
+ font-size: 16px;
42
+ color: white;
43
+ background-color: #4CAF50;
44
+ border: none;
45
+ cursor: pointer;
46
+ border-radius: 5px;
47
+ }
48
+ #verifyButton:hover, #fileInput:hover {
49
+ background-color: #388E3C;
50
+ }
51
+ #downloadLink {
52
+ display: inline-block;
53
+ margin-top: 20px;
54
+ padding: 10px 20px;
55
+ font-size: 16px;
56
+ color: white;
57
+ background-color: #4CAF50;
58
+ text-decoration: none;
59
+ border-radius: 5px;
60
+ }
61
+ #downloadLink:hover {
62
+ background-color: #388E3C;
63
+ }
64
+ </style>
65
  </head>
66
  <body>
67
+ <h1>Phone Verification</h1>
68
+ <div id="progressBarContainer">
69
+ <div id="progressBar">
70
+ <div id="progress">0%</div>
71
+ </div>
72
+ </div>
73
  <input type="file" id="fileInput" accept=".txt">
74
  <button id="verifyButton">Verify Phones</button>
75
  <a id="downloadLink" style="display: none;">Download Verified Phones</a>
 
93
  });
94
 
95
  async function verifyPhones(phones, delay) {
96
+ const totalPhones = phones.length;
97
+ const progressBar = document.getElementById('progress');
98
+ const progressText = document.getElementById('progress').textContent;
99
  const verifiedPhones = [];
100
+
101
+ for (let i = 0; i < totalPhones; i++) {
102
  const phone = phones[i];
103
  try {
104
  const response = await fetch('https://api.green-api.com/waInstance1101952913/checkWhatsapp/fb4986a9d9cb40ef9be6c7b08cb9c98b7a3b1dc8c6834b0b92', {
 
119
  console.error(`Error verifying phone ${phone}:`, error);
120
  }
121
 
122
+ const progress = ((i + 1) / totalPhones) * 100;
123
+ progressBar.style.width = `${progress}%`;
124
+ progressBar.textContent = `${progress.toFixed(2)}%`;
125
+
126
+ if (i < totalPhones - 1) {
127
  await new Promise(resolve => setTimeout(resolve, delay));
128
  }
129
  }
 
134
  const downloadLink = document.getElementById('downloadLink');
135
  downloadLink.href = url;
136
  downloadLink.download = 'verified_phones.txt';
137
+ downloadLink.style.display = 'inline-block';
138
  }
139
  </script>
140
  </body>