Skip to content

Instantly share code, notes, and snippets.

@MalikAQayum
Last active July 7, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MalikAQayum/07d0211cc4ba062115d4834f931b92bc to your computer and use it in GitHub Desktop.
Save MalikAQayum/07d0211cc4ba062115d4834f931b92bc to your computer and use it in GitHub Desktop.
/* Setting the Favorite / Featured Badge back to none.
* go to: https://store.steampowered.com/points/shop or https://steamcommunity.com/my/edit/info
* open dev tools (chrome press f12)
* paste the below code snippet.
*/
var access_token = "";
var badgeid = 0;
if (window.location.href.indexOf("steampowered") > -1) {
access_token = $J("[data-loyaltystore]").data("loyaltystore").webapi_token;
}
else if(window.location.href.indexOf("steamcommunity") > -1)
{
access_token = JSON.parse($J("#profile_edit_config").attr("data-profile-edit")).webapi_token;
SetFavoriteFeaturedBadge(access_token, badgeid);
}
else
{
console.log("go to: https://store.steampowered.com/points/shop or https://steamcommunity.com/my/edit/info");
SetFavoriteFeaturedBadge(access_token, badgeid);
}
function SetFavoriteFeaturedBadge(access_token, badgeid) {
$J.post( 'https://api.steampowered.com/IPlayerService/SetFavoriteBadge/v1?', {
access_token: access_token,
badgeid: badgeid
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment