BraydenMoore commited on
Commit
7d7e1e3
·
1 Parent(s): 8b3b62a

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +1 -17
templates/index.html CHANGED
@@ -282,21 +282,6 @@
282
  locationName.textContent = "{{ page_title|safe }}";
283
 
284
  const newUrl = decodeURIComponent("{{ url|safe }}");
285
-
286
- //function refreshImage() {
287
- // let xhr = new XMLHttpRequest();
288
- // xhr.open('HEAD', newUrl + '?t=' + new Date().getTime(), true);
289
- // xhr.onreadystatechange = function() {
290
- // if (xhr.readyState === 4) {
291
- // if (xhr.status === 200) {
292
- // if (xhr.getResponseHeader('Content-Type') === 'image/jpeg') {
293
- // img.src = newUrl + '&t=' + new Date().getTime();
294
- // }
295
- // }
296
- // }
297
- // };
298
- // xhr.send();
299
- //}
300
 
301
  async function refreshImage() {
302
  const timestamp = new Date().getTime();
@@ -322,9 +307,8 @@
322
  infoDiv.style.opacity = "0";
323
  }
324
  firstLoad = false;
325
- old = newUrl;
326
  setTimeout(() => {
327
- feed.src = this.src;
328
  locationName.textContent = "{{ name|safe }}";
329
  countryElement.textContent = "{{ country }}";
330
  feed.style.width = "100%";
 
282
  locationName.textContent = "{{ page_title|safe }}";
283
 
284
  const newUrl = decodeURIComponent("{{ url|safe }}");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
 
286
  async function refreshImage() {
287
  const timestamp = new Date().getTime();
 
307
  infoDiv.style.opacity = "0";
308
  }
309
  firstLoad = false;
 
310
  setTimeout(() => {
311
+ feed.src = newUrl;
312
  locationName.textContent = "{{ name|safe }}";
313
  countryElement.textContent = "{{ country }}";
314
  feed.style.width = "100%";