Last active
July 7, 2020 09:46
-
-
Save MalikAQayum/07d0211cc4ba062115d4834f931b92bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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