I'm writing a Tampermonkey script on Chrome for Steam Inventory. There is a "View badge progress" button with a link on the right when clicking on most items in the inventory on the left. I can get the href value directly from the link by using the "querySelector" method. But the problem is, most of the time, the href value won't return the newest one without clicking the items on the left twice. That's very annoying. When I inspect the link of the button under the "Elements" tab in the Chrome DevTools, I found the same thing. The href value won't update unless I click the item in the inventory twice.
However, I found when the mouse cursor hovering on the button, there is a link generated by the Chrome browser that is always correct/the newest one showed up on the left-bottom corner. I'm wondering is there any way to get the link from it?
This is the screenshot: https://i.imgur.com/PsMGn1r.png
❗[EDIT] - - - - - - - - - - - - - - -
It's the personal Steam Inventory page like this one for example. This not me. :) https://steamcommunity.com/id/eroticgaben/inventory/
But it has to be the inventroy page of your own Steam account to be able to view the "View badge progress" button.
The inventory page is always like the following:
https://steamcommunity.com/id/xxxxNAMExxxx/inventory/
https://steamcommunity.com/profiles/xxxxNUMBERsxxxx/inventory/