From 71d2a9954ba4608f4c4c3fee64d27a9ba62b6176 Mon Sep 17 00:00:00 2001 From: DirtyRacer1337 Date: Fri, 4 Oct 2024 02:29:55 +0700 Subject: [PATCH] [Stats] Fix order (#449) --- plugins/stats/stats.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/stats/stats.js b/plugins/stats/stats.js index 2079cd0c..c3e11992 100644 --- a/plugins/stats/stats.js +++ b/plugins/stats/stats.js @@ -64,7 +64,7 @@ // percentage helper const percentage = (portion, total) => - (total > 0 ? ((portion / total) * 100).toFixed(2) : 0) + "%"; + (total > 0 ? (portion / total) * 100 : 0).toFixed(2) + "%"; // *** actual stats fetching *** // performer of scenes with any StashID @@ -181,7 +181,7 @@ "div.container-fluid div.mt-5", setupStats ); - function setupStats(el) { + async function setupStats(el) { if (document.querySelector(".custom-stats-row")) return; const changelog = el.querySelector("div.changelog"); const rowOne = document.createElement("div"); @@ -190,16 +190,16 @@ const rowTwo = rowOne.cloneNode(); el.insertBefore(rowTwo, changelog); // row one - createSceneStashIDPct(rowOne); - createStudioStashIDPct(rowOne); - createPerformerStashIDPct(rowOne); - createPerformerFavorites(rowOne); - createMarkersStat(rowOne); + await createSceneStashIDPct(rowOne); + await createStudioStashIDPct(rowOne); + await createPerformerStashIDPct(rowOne); + await createPerformerFavorites(rowOne); + await createMarkersStat(rowOne); // row two - createTagHasImage(rowTwo); - createStudioHasimage(rowTwo); - createPerformerHasImage(rowTwo); - createMovieHasCover(rowTwo); - createSceneOverWebHD(rowTwo); + await createTagHasImage(rowTwo); + await createStudioHasimage(rowTwo); + await createPerformerHasImage(rowTwo); + await createMovieHasCover(rowTwo); + await createSceneOverWebHD(rowTwo); } })();