Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions plugins/stats/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand All @@ -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);
}
})();