Useful JQuery snippets for dealing with homepage badges

DataMine
by DataMine · 3 posts
6 years ago in Javascript
Posted 6 years ago · Author
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-",""));
})
Posted 5 years ago
Thanks for the tips again Datamine
Posted 4 years ago
Hi, will it be possible to get all the `Auto Grant Enabled` badge IDs from https://badgedirectory.com ?

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