BraydenMoore commited on
Commit
40cdd39
1 Parent(s): 6df8ff9

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +16 -0
templates/index.html CHANGED
@@ -293,6 +293,22 @@
293
  }
294
  } catch (error) {
295
  console.error('Fetch failed:', error);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  }
297
  }
298
 
 
293
  }
294
  } catch (error) {
295
  console.error('Fetch failed:', error);
296
+ const urlParams = new URLSearchParams(window.location.search);
297
+
298
+ if (urlParams.get('id')) {
299
+ firstLoad = false;
300
+ feed.style.width = "80px";
301
+ feed.style.height = "50px";
302
+ feed.src = loadingGif;
303
+ feed.style.opacity = "0.15";
304
+ countryElement.textContent = "couldn't connect.";
305
+ } else if (firstLoad) {
306
+ window.location.href = "?new=true";
307
+ } else {
308
+ firstLoad = false;
309
+ console.log("Trying again");
310
+ setTimeout(refreshImage, 250);
311
+ }
312
  }
313
  }
314