Spaces:
Running
Running
Commit
·
6ae3082
1
Parent(s):
9c3cc5f
Update templates/index.html
Browse files- templates/index.html +4 -13
templates/index.html
CHANGED
@@ -319,9 +319,7 @@
|
|
319 |
setTimeout(refreshImage, 250);
|
320 |
country.textContent = "{{ country }}"
|
321 |
};
|
322 |
-
|
323 |
-
let retryCount = 0;
|
324 |
-
const maxRetries = 3;
|
325 |
img.onerror = function() {
|
326 |
feed.style.width = "80px";
|
327 |
feed.style.height = "50px";
|
@@ -332,17 +330,10 @@
|
|
332 |
|
333 |
if (urlParams.get('id')) {
|
334 |
countryElement.textContent = "couldn't connect.";
|
335 |
-
}
|
|
|
336 |
window.location.href = "?new=true";
|
337 |
-
}
|
338 |
-
console.log('Error loading, trying again.');
|
339 |
-
if (retryCount < maxRetries) {
|
340 |
-
setTimeout(refreshImage, 250);
|
341 |
-
retryCount++;
|
342 |
-
} else {
|
343 |
-
console.log('Max retry attempts reached.');
|
344 |
-
}
|
345 |
-
}
|
346 |
};
|
347 |
|
348 |
img.src = newUrl;
|
|
|
319 |
setTimeout(refreshImage, 250);
|
320 |
country.textContent = "{{ country }}"
|
321 |
};
|
322 |
+
|
|
|
|
|
323 |
img.onerror = function() {
|
324 |
feed.style.width = "80px";
|
325 |
feed.style.height = "50px";
|
|
|
330 |
|
331 |
if (urlParams.get('id')) {
|
332 |
countryElement.textContent = "couldn't connect.";
|
333 |
+
}
|
334 |
+
else {
|
335 |
window.location.href = "?new=true";
|
336 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
};
|
338 |
|
339 |
img.src = newUrl;
|