Update up_gr.html
Browse files- up_gr.html +4 -5
up_gr.html
CHANGED
@@ -77,13 +77,13 @@
|
|
77 |
const fileInput = document.getElementById('fileInput');
|
78 |
const file = fileInput.files[0];
|
79 |
if (!apiKey || !groupName || !file) {
|
80 |
-
|
81 |
return;
|
82 |
}
|
83 |
const reader = new FileReader();
|
84 |
reader.onload = async function(event) {
|
85 |
const text = event.target.result;
|
86 |
-
const chatIds = text.split('\n').map(line => line.trim()).filter(line => line);
|
87 |
const payload = {
|
88 |
groupName: groupName,
|
89 |
chatIds: chatIds
|
@@ -104,11 +104,10 @@
|
|
104 |
}
|
105 |
const data = await response.json();
|
106 |
document.getElementById('groupIdToCopy').innerText = data.chatId;
|
107 |
-
|
108 |
console.log('Response JSON:', data);
|
109 |
} catch (error) {
|
110 |
console.error('Error creating group:', error);
|
111 |
-
alert('Error creating group.');
|
112 |
}
|
113 |
};
|
114 |
reader.readAsText(file);
|
@@ -121,7 +120,7 @@
|
|
121 |
tempInput.select();
|
122 |
document.execCommand('copy');
|
123 |
document.body.removeChild(tempInput);
|
124 |
-
|
125 |
}
|
126 |
</script>
|
127 |
</body>
|
|
|
77 |
const fileInput = document.getElementById('fileInput');
|
78 |
const file = fileInput.files[0];
|
79 |
if (!apiKey || !groupName || !file) {
|
80 |
+
console.error('Please enter an API key, group name, and select a file.');
|
81 |
return;
|
82 |
}
|
83 |
const reader = new FileReader();
|
84 |
reader.onload = async function(event) {
|
85 |
const text = event.target.result;
|
86 |
+
const chatIds = text.split('\n').map(line => line.trim() + '@c.us').filter(line => line);
|
87 |
const payload = {
|
88 |
groupName: groupName,
|
89 |
chatIds: chatIds
|
|
|
104 |
}
|
105 |
const data = await response.json();
|
106 |
document.getElementById('groupIdToCopy').innerText = data.chatId;
|
107 |
+
console.log('Group created successfully!');
|
108 |
console.log('Response JSON:', data);
|
109 |
} catch (error) {
|
110 |
console.error('Error creating group:', error);
|
|
|
111 |
}
|
112 |
};
|
113 |
reader.readAsText(file);
|
|
|
120 |
tempInput.select();
|
121 |
document.execCommand('copy');
|
122 |
document.body.removeChild(tempInput);
|
123 |
+
console.log('Group ID copied to clipboard!');
|
124 |
}
|
125 |
</script>
|
126 |
</body>
|