// Your Steam game IDs var gameIDs = [1549970, 440, 730]; // Replace with your game IDs // Get the session ID from cookies var sessionID = document.cookie.match(/sessionid=([^;]+)/)[1]; // Function to add games to the wishlist async function addToWishlist(gameIDs) { for (let i = 0; i < gameIDs.length; i++) { let appID = gameIDs[i]; await fetch('https://store.steampowered.com/api/addtowishlist', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: `appid=${appID}&sessionid=${sessionID}` }).then(response => { if (response.ok) { console.log(`Added appID: ${appID} to wishlist`); } else { console.error(`Failed to add appID: ${appID}`); } }).catch(error => console.error(`Error adding appID: ${appID}`, error)); await new Promise(resolve => setTimeout(resolve, 150)); // Delay to avoid triggering rate limits } console.log('All games processed'); } // Start the process addToWishlist(gameIDs);