gerritwalther/sg2o

Wishlisted games with a long title are not correctly colored

Opened this issue · 3 comments

If a game (e.g. "CitiesCorp Concept - Build Everything on Your Own") has a very long title and is shortened with three dots the border is not correctly colored.

In these cases either do a request to the steam link for the full title or compare to the giveaway link (replace all spaces and special characters with a '-'). The former solution seems like the more robust, but requires an additional request per shortened game.

Request the full title in the first place.

Does not quite work, as the response arrives after the script is fully loaded.

Use @connect annotation in the meta data to request data from steam:

// @connect     store.steampowered.com

Then request the title of games with '...' at the end of the name and store that name in the local storage with the app id. Before requesting the data from Steam, do a lookup in the local storage.

http://store.steampowered.com/api/appdetails?appids=57690

Instead of getting the full title, check if the steam app id can be requested from the wishlist and compare that in addition to the title.