Spaces:
Runtime error
Runtime error
DmitrMakeev
commited on
Commit
•
3eb869a
1
Parent(s):
db83b75
Update se_mes_im2.html
Browse files- se_mes_im2.html +5 -7
se_mes_im2.html
CHANGED
@@ -31,7 +31,7 @@
|
|
31 |
border: 1px solid #ccc;
|
32 |
border-radius: 5px;
|
33 |
}
|
34 |
-
#messageInput
|
35 |
width: 80%;
|
36 |
margin-top: 20px;
|
37 |
}
|
@@ -73,8 +73,6 @@
|
|
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 |
-
<input type="text" id="urlFileInput" placeholder="Введите URL файла">
|
77 |
-
<input type="text" id="fileNameInput" placeholder="Введите название файла">
|
78 |
<textarea id="messageInput" placeholder="Введите текст сообщения с картинкой."></textarea>
|
79 |
<div id="progressBarContainer">
|
80 |
<div id="progressBar">
|
@@ -87,8 +85,8 @@
|
|
87 |
<script>
|
88 |
document.getElementById('sendButton').addEventListener('click', function() {
|
89 |
const apiKey = document.getElementById('apiKeyInput').value;
|
90 |
-
const urlFile =
|
91 |
-
const fileName =
|
92 |
const message = document.getElementById('messageInput').value;
|
93 |
const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
|
94 |
const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 10000;
|
@@ -97,11 +95,11 @@
|
|
97 |
return;
|
98 |
}
|
99 |
if (!urlFile) {
|
100 |
-
alert('
|
101 |
return;
|
102 |
}
|
103 |
if (!fileName) {
|
104 |
-
alert('
|
105 |
return;
|
106 |
}
|
107 |
if (!message) {
|
|
|
31 |
border: 1px solid #ccc;
|
32 |
border-radius: 5px;
|
33 |
}
|
34 |
+
#messageInput {
|
35 |
width: 80%;
|
36 |
margin-top: 20px;
|
37 |
}
|
|
|
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="Введите текст сообщения с картинкой."></textarea>
|
77 |
<div id="progressBarContainer">
|
78 |
<div id="progressBar">
|
|
|
85 |
<script>
|
86 |
document.getElementById('sendButton').addEventListener('click', function() {
|
87 |
const apiKey = document.getElementById('apiKeyInput').value;
|
88 |
+
const urlFile = localStorage.getItem('fileUrl');
|
89 |
+
const fileName = localStorage.getItem('filename');
|
90 |
const message = document.getElementById('messageInput').value;
|
91 |
const minDelay = parseInt(document.getElementById('minDelayInput').value) || 500;
|
92 |
const maxDelay = parseInt(document.getElementById('maxDelayInput').value) || 10000;
|
|
|
95 |
return;
|
96 |
}
|
97 |
if (!urlFile) {
|
98 |
+
alert('URL of the file is not found in local storage.');
|
99 |
return;
|
100 |
}
|
101 |
if (!fileName) {
|
102 |
+
alert('File name is not found in local storage.');
|
103 |
return;
|
104 |
}
|
105 |
if (!message) {
|