Skip to content

Commit

Permalink
Merge pull request #42 from tryton-vanmeer/wishlist-skip-before-rating
Browse files Browse the repository at this point in the history
Wishlist: Get Rating After Checking If Exists
  • Loading branch information
tryton-vanmeer committed Nov 15, 2023
2 parents c0cf001 + f38107e commit 448db1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/wishlist.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use strict";

async function insertRating(row) {
const appid = row.getAttribute("data-app-id");
const rating = await getRatingElement(appid);

const statsContainer = row.querySelector(".stats");

if (statsContainer.querySelector(".protondb_rating_link")) {
return true;
}

const appid = row.getAttribute("data-app-id");
const rating = await getRatingElement(appid);

const label = document.createElement("div");
const value = document.createElement("div");

Expand All @@ -27,7 +27,7 @@ function insertRatings() {
const rows = document.getElementById("wishlist_ctn");

for (const row of rows.getElementsByClassName("wishlist_row")) {
insertRating(row)
insertRating(row);
}

setTimeout(insertRatings, 1000);
Expand Down

0 comments on commit 448db1a

Please sign in to comment.