DmitrMakeev commited on
Commit
216bab1
1 Parent(s): 81cb3f9

Rename ver2.html to se_mes.html

Browse files
Files changed (1) hide show
  1. ver2.html → se_mes.html +9 -4
ver2.html → se_mes.html RENAMED
@@ -72,6 +72,10 @@
72
  <input type="text" id="apiKeyInput" placeholder="Enter API Key">
73
  <input type="number" id="minDelayInput" placeholder="Min Delay (ms)" value="500">
74
  <input type="number" id="maxDelayInput" placeholder="Max Delay (ms)" value="1000">
 
 
 
 
75
  </div>
76
  <textarea id="messageInput" placeholder="Enter Message"></textarea>
77
  <div id="progressBarContainer">
@@ -87,7 +91,8 @@
87
  const apiKey = document.getElementById('apiKeyInput').value;
88
  const message = document.getElementById('messageInput').value;
89
  const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
90
- const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 10000;
 
91
 
92
  if (!apiKey) {
93
  alert('Please enter your API key.');
@@ -113,12 +118,12 @@
113
  reader.onload = function(event) {
114
  const text = event.target.result;
115
  const phones = text.split('\n').map(phone => phone.trim()).filter(phone => phone);
116
- sendMessages(phones, apiKey, message, minDelay, maxDelay);
117
  };
118
  reader.readAsText(file);
119
  });
120
 
121
- async function sendMessages(phones, apiKey, message, minDelay, maxDelay) {
122
  const totalPhones = phones.length;
123
  const progressBar = document.getElementById('progress');
124
  const progressText = document.getElementById('progress').textContent;
@@ -134,7 +139,7 @@
134
  body: JSON.stringify({
135
  chatId: `${phone}@c.us`,
136
  message: message,
137
- linkPreview: true
138
  })
139
  });
140
  if (!response.ok) {
 
72
  <input type="text" id="apiKeyInput" placeholder="Enter API Key">
73
  <input type="number" id="minDelayInput" placeholder="Min Delay (ms)" value="500">
74
  <input type="number" id="maxDelayInput" placeholder="Max Delay (ms)" value="1000">
75
+ <label>
76
+ Link Preview:
77
+ <input type="checkbox" id="linkPreviewCheckbox" checked>
78
+ </label>
79
  </div>
80
  <textarea id="messageInput" placeholder="Enter Message"></textarea>
81
  <div id="progressBarContainer">
 
91
  const apiKey = document.getElementById('apiKeyInput').value;
92
  const message = document.getElementById('messageInput').value;
93
  const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
94
+ const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 1000;
95
+ const linkPreview = document.getElementById('linkPreviewCheckbox').checked;
96
 
97
  if (!apiKey) {
98
  alert('Please enter your API key.');
 
118
  reader.onload = function(event) {
119
  const text = event.target.result;
120
  const phones = text.split('\n').map(phone => phone.trim()).filter(phone => phone);
121
+ sendMessages(phones, apiKey, message, minDelay, maxDelay, linkPreview);
122
  };
123
  reader.readAsText(file);
124
  });
125
 
126
+ async function sendMessages(phones, apiKey, message, minDelay, maxDelay, linkPreview) {
127
  const totalPhones = phones.length;
128
  const progressBar = document.getElementById('progress');
129
  const progressText = document.getElementById('progress').textContent;
 
139
  body: JSON.stringify({
140
  chatId: `${phone}@c.us`,
141
  message: message,
142
+ linkPreview: linkPreview
143
  })
144
  });
145
  if (!response.ok) {