Closed Deuchnord closed 9 months ago
Refreshing the page can get rid of the extra badges, but they start coming back if you scroll down the page:
Browser: Firefox 107.0.1
Addon Version: 1.8.1
Same issue here. Firefox 108.0.1 Addon 1.8.1
This occurs when the script takes more than 1 second to add a badge. The script tries to load badges every second, skipping over games it has already added a badge to. If the page is loading slowly, it adds multiple (because it retries before it finished processing the first time). I'm not entirely sure why, but this can be fixed by adjusting ProtonDB.request_rating()
to use a promise instead of a callback, and changing Wishlist.load_ratings()
to be async, and awaiting the ProtonDB request.
Here's a video demo reproducing it with the Firefox devtools throttling: https://www.youtube.com/watch?v=NoZkZqIUAzw
And here's the branch that fixes it by changing to to a promise: https://github.com/Rayquaza01/ProtonDB-for-Steam/tree/promise
Fixed in 404fe3d407c0aa0ff1f2b8eb7956ae84349c3233
Expected Behaviour:
On wishlist, the badge should be displayed only once per game.
Actual Behaviour:
The badge is displayed several times (generally twice or three times).
Steps to Reproduce:
Details
Browser:
Browser Version: 103.0.2
Addon Version: 1.8.1