Jump to content
McKay Development

Keeping Showcases on Profile with editProfile


Mr.Derp

Recommended Posts

Hello, I'm currently for fun messing with changing my steam background every few seconds. It works quite well except for the fact that it wipes my profile showcases every time.

https://steamcommunity.com/id/iLoveAnime69/

 

I tried to edit the module myself to get it to work but can't quite do it and can only get 1 to work. I see that there's a comment in profile.js that it's in the TODO but any help would be appreciated.

 

When I read form.serializeArray() and print their names and values it has multiple names called "profile_showcase[]" however when it get's added to the values object array it just overwrites itself and I read that there can't be more than 1 of the same key

case 'profileShowcase':
	var testname = "profile_showcase[]";
	values[testname] = settings[i]; 

.So I just added the above to profile.js and it works for just 1 showcase. I don't really want to use the module to set the showcases, I'd just like them not to be cleared if there was a way to store it directly in the values array that's passed on. Any help would be appreciated and if someone could get it working i'd be willing to Paypal $15 if they'd want

Link to comment
Share on other sites

  • 4 weeks later...

Post your read from form.serializeArray() I can take a look if you want. Probably profile_showcase[] is an array that's not being correctly converted on the code that loads the current profile data:

form.serializeArray().forEach(function(item) {
	values[item.name] = item.value;
});
Edited by Van Kappa
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...