SteamDatabase / BrowserExtension

💻 SteamDB's extension for Steam websites
https://steamdb.info/extension/
BSD 3-Clause "New" or "Revised" License
762 stars 55 forks source link

"Remove from wishlist" option should always be shown if a /app/ is wishlisted. #106

Closed Luckz closed 2 years ago

Luckz commented 2 years ago

If a game is owned, the remove from WL button isn't shown even if the game is also wishlisted. Since there are numerous conditions under which games can be both owned and wishlisted, it'd be handy to see this in the UI and be able to rectify it if needed.

image

(I guess for PreserveOnWishlist | Yes you can't remove them anyway, at least not with RemoveFromWishlist()....)

Maybe you first have to remove all relevant licenses before you can de-wishlist most or pretty much all affected products => my idea is just stupid.

xPaw commented 2 years ago

Well, can you confirm whether you can remove them from wishlist if you own them?

Luckz commented 2 years ago

Well, can you confirm whether you can remove them from wishlist if you own them?

I haven't found a case in which an owned game can definitely be removed from wishlist just with RemoveFromWishlist(), without first rmoving/disabling the licenses for it, or at least the licenses that PreserveOnWishlist.

🤪 I suppose it would be worth testing what happens if a game is owned with PreserveOnWishlist, additionally owned without PreserveOnWishlist, still wishlisted, and then the PreserveOnWishlist license is revoked. 😣 (=> does Steam ever automatically remove it? can it be removed manually?) At least if you just remove a normal store license, then wishlist the game, then reactivate the store license, you can't get rid of the WL with an immediate RemoveFromWishlist(). You have to first re-remove the license. But I didn't test if there's maybe some cron job that eventually does it. Additionally I can't be sure manual license disabling behaves the same as say losing a license through revocation.


To even see what is wishlisted despite being owned, I wrote a very ugly userscript along the lines of

const path = location.pathname.split('/');
const appid = path[2];
const app = (path[1] === 'app');

if (app && document.getElementById('add_to_wishlist_area_success') === null && GDynamicStore.BIsAppOnWishlist(appid))

I suppose if there's no practical value to the button in that state, I could just change the background colour of the Owned app-link-green to something ugly. I can't access the SteamDB extension's unwishlisting code from a userscript, right? 😎