Skip to content

Commit a4ce30f

Browse files
committed
Try fetch
1 parent bc142c6 commit a4ce30f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

js/media.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
async function loadMedia() {
2-
const res = await fetch("../media/media.json");
2+
const res = await fetch("media/media.json");
33
const media = await res.json();
44

55
let htmlElements = '';
@@ -59,3 +59,5 @@ async function loadMedia() {
5959
layoutMode: 'fitRows'
6060
});
6161
}
62+
63+
window.addEventListener("DOMContentLoaded", loadMedia);

js/media.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)