BraydenMoore commited on
Commit
46df8d0
1 Parent(s): 2afc752

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +2 -2
templates/index.html CHANGED
@@ -267,6 +267,7 @@
267
  let currentFeed;
268
  let firstLoad = true;
269
  document.addEventListener("DOMContentLoaded", function() {
 
270
  const feed = document.getElementById("feed");
271
  feed.style.width = "80px";
272
  feed.style.height = "50px";
@@ -327,7 +328,6 @@
327
 
328
  const urlParams = new URLSearchParams(window.location.search);
329
  const countryElement = document.getElementById("country");
330
- const id = this.getAttribute("data-id");
331
 
332
  if (urlParams.get('id')) {
333
  feed.style.opacity = "0.15";
@@ -338,7 +338,7 @@
338
  }
339
  else {
340
  console.log("error, refreshing");
341
- window.location.href = `?new=false&id=${id}`;
342
  }
343
  };
344
 
 
267
  let currentFeed;
268
  let firstLoad = true;
269
  document.addEventListener("DOMContentLoaded", function() {
270
+ currentFeed = this.getAttribute("data-id");
271
  const feed = document.getElementById("feed");
272
  feed.style.width = "80px";
273
  feed.style.height = "50px";
 
328
 
329
  const urlParams = new URLSearchParams(window.location.search);
330
  const countryElement = document.getElementById("country");
 
331
 
332
  if (urlParams.get('id')) {
333
  feed.style.opacity = "0.15";
 
338
  }
339
  else {
340
  console.log("error, refreshing");
341
+ window.location.href = `?new=false&id=${currentFeed}`;
342
  }
343
  };
344