BraydenMoore commited on
Commit
3c8edf7
1 Parent(s): b757a3b

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +15 -12
templates/index.html CHANGED
@@ -179,18 +179,21 @@
179
 
180
  <script>
181
 
182
- document.addEventListener("DOMContentLoaded", function() {
183
- const feed = document.getElementById("feed");
184
- feed.src = "{{ url_for('static', filename='loading.gif') }}";
185
-
186
- const newUrl = "{{ url }}";
187
-
188
- const img = new Image();
189
- img.onload = function() {
190
- feed.src = this.src;
191
- };
192
- img.src = newUrl;
193
- });
 
 
 
194
 
195
  </script>
196
  </body>
 
179
 
180
  <script>
181
 
182
+ document.addEventListener("DOMContentLoaded", function() {
183
+ const feed = document.getElementById("feed");
184
+ feed.src = "{{ url_for('static', filename='loading.gif') }}";
185
+
186
+ const newUrl = "{{ url }}";
187
+
188
+ const img = new Image();
189
+ img.onload = function() {
190
+ feed.src = this.src;
191
+ };
192
+ img.onerror = function() {
193
+ feed.src = "{{ url_for('static', filename='error.png') }}"; // You can set an error image here
194
+ };
195
+ img.src = newUrl;
196
+ });
197
 
198
  </script>
199
  </body>