DmitrMakeev
commited on
Commit
•
6c1489a
1
Parent(s):
b1f18e2
Update up_user_gp.html
Browse files- up_user_gp.html +16 -3
up_user_gp.html
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
6 |
<title>Add Participants to Group</title>
|
7 |
<style>
|
8 |
body {
|
@@ -77,7 +78,7 @@
|
|
77 |
</div>
|
78 |
<input type="file" id="fileInput" accept=".txt">
|
79 |
<button id="addButton">Зупустить цикл добавления</button>
|
80 |
-
|
81 |
<script>
|
82 |
document.getElementById('addButton').addEventListener('click', function() {
|
83 |
const apiKey = document.getElementById('apiKeyInput').value;
|
@@ -85,13 +86,25 @@
|
|
85 |
const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
|
86 |
const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 1000;
|
87 |
if (!apiKey || !groupId) {
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
return;
|
90 |
}
|
91 |
const fileInput = document.getElementById('fileInput');
|
92 |
const file = fileInput.files[0];
|
93 |
if (!file) {
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
return;
|
96 |
}
|
97 |
const reader = new FileReader();
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
|
7 |
<title>Add Participants to Group</title>
|
8 |
<style>
|
9 |
body {
|
|
|
78 |
</div>
|
79 |
<input type="file" id="fileInput" accept=".txt">
|
80 |
<button id="addButton">Зупустить цикл добавления</button>
|
81 |
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
|
82 |
<script>
|
83 |
document.getElementById('addButton').addEventListener('click', function() {
|
84 |
const apiKey = document.getElementById('apiKeyInput').value;
|
|
|
86 |
const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
|
87 |
const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 1000;
|
88 |
if (!apiKey || !groupId) {
|
89 |
+
Toastify({
|
90 |
+
text: "Проверьте правильность API ключа или ID группы",
|
91 |
+
duration: 3000,
|
92 |
+
gravity: "top",
|
93 |
+
position: "center",
|
94 |
+
backgroundColor: "fc0303",
|
95 |
+
}).showToast();
|
96 |
return;
|
97 |
}
|
98 |
const fileInput = document.getElementById('fileInput');
|
99 |
const file = fileInput.files[0];
|
100 |
if (!file) {
|
101 |
+
Toastify({
|
102 |
+
text: "Добавьте файл с подписчиками",
|
103 |
+
duration: 3000,
|
104 |
+
gravity: "top",
|
105 |
+
position: "center",
|
106 |
+
backgroundColor: "fc0303",
|
107 |
+
}).showToast();
|
108 |
return;
|
109 |
}
|
110 |
const reader = new FileReader();
|