Useful JQuery snippets for dealing with homepage badges 2 posts

OP Fri Jan 26, 2018 11:34 am
User avatar
Administrator
Legendary Family Member
  • Gender: Male
  • Posts: 6284
  • Joined: Jun, 2010
  • Advertisements: 45
  • Karma: 368
The following are JQuery snippets you can use in your scripts or run in the web console to perform different tasks with badges on an IMVU homepage.

I used these snippets when working on my badge granting scripts.



Output all of the badge images in the badges panel to the console.

For example I used this to get all the urls, then turned them into html image in Notepad++ then loaded them into an html editor so I could take a screenshot of them all to use as a preview for the badge granter script I wrote here: viewtopic.php?f=103&t=11885

Code
$('#badges_panel img').each(function(i, obj){
   console.log($(obj).attr('src'));
})



Output all the badge ids to the console

Note: this only works when ran on the imvu-customer-sandbox.com domain
Code
$('.request_badge_button').each(function(i, obj){
   badges.push($(obj).attr('id').replace("grant-",""));
})
Wed Jun 05, 2019 5:33 pm
User avatar
  • Posts: 37
  • Joined: May, 2019
  • Karma: 0
Thanks for the tips again Datamine

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT