diff --git a/docs/elements/define-elements.js b/docs/elements/define-elements.js index 3524709..b28caba 100644 --- a/docs/elements/define-elements.js +++ b/docs/elements/define-elements.js @@ -138,11 +138,15 @@ class ProjectCard extends HTMLElementHelper { fetchThumbItch(row) { if (row.get("url").includes("itch.io")) { - this.scrapThumbItch(row.get("url")); + this.setThumbItch(row.get("url")); return ProjectPage._missingThumbnail + "?INFO_fetching_from_itch"; } } + async setThumbItch(url) { + this.thumbnail = await this.scrapThumbItch(url); + } + async scrapThumbItch(url) { const json = await ProjectCard.CORSProxyFetch(url + "/data.json"); if (json === undefined) { @@ -152,7 +156,7 @@ class ProjectCard extends HTMLElementHelper { // const json = await (await fetch(url + "/data.json")).json(); const imageURL = json["cover_image"]; ProjectCard.fetchedImageURLs[this.projectID] = imageURL; - this.thumbnail = ProjectCard.toCORSProxy(imageURL); + return ProjectCard.toCORSProxy(imageURL); } fetchThumbRoblox(row) {