dynamically list maps avaialble
This commit is contained in:
parent
3246b44a86
commit
cc69d322ca
8 changed files with 70 additions and 52 deletions
|
|
@ -36,11 +36,8 @@ if (btnModal) {
|
|||
}
|
||||
|
||||
function renderPlaceholders() {
|
||||
const usbButter = document.querySelector('#usb-butter');
|
||||
const appstoreCard = document.querySelector('#appstore-card');
|
||||
const mapsCard = document.querySelector('#maps-card');
|
||||
const conditionalCards = [appstoreCard, usbButter, mapsCard];
|
||||
for (let card of conditionalCards) {
|
||||
const discovered = document.querySelectorAll(".hidden-card");
|
||||
for (let card of discovered) {
|
||||
fetch(card.dataset.url)
|
||||
.then(response => {
|
||||
if (response.status === 200) {
|
||||
|
|
@ -57,5 +54,4 @@ function renderPlaceholders() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
renderPlaceholders();
|
||||
Loading…
Add table
Add a link
Reference in a new issue