[Bookmarklet] IMVU - Open All Product Pages

DataMine
by DataMine · 3 posts
10 years ago in Javascript
Posted 10 years ago · Author
About
Are you someone who wants to open all of the links to IMVU products pages found in the catalog or another website? Look no further, I have the bookmarklet just for you!

This bookmarklet will look through a web page and find all of the links to imvu products, it will then open each link to the product page in a new tab. Depending on the specs of your computer and internet, it may take a min to load everything.


How To Install - FireFox

1) Right click on the bookmark toolbar and select "New Bookmark". If you don't have the bookmark toolbar visible press alt to bring up the menubar.
Then click view, hover over Toolbars and click "Bookmark Toolbar"
2) Give the bookmarklet a name by typing something into the "Name" field.
3) Copy and paste the code below into the "Location" field.
4) Click add


How To Install - Chrome

1) Right click on the bookmark toolbar and select "Add Page". If you don't have the bookmark toolbar visible open the settings menu and scroll down to appearance. Then checkmark the box that says "Always show the bookmarks bar".
2) Give the bookmarklet a name by typing something into the "Name" field.
3) Copy and paste the code below into the "URL" field.
4) Click Save

[code=javascript file=Untitled.txt]javascript: (function openppages() {
/*Create array to hold all the product page links on
the current catalog page. This array will contain dupes.*/
var strarryPL1 = new Array();

/*Grab all the links on the current catalog page.*/
var Links1 = document.getElementsByTagName('a');

/*Loop through all the links and pull out product
page links only and add them to the array.*/
for(var h = 0; h < Links1.length; h++){
if(Links1[h].href.indexOf("http://www.imvu.com/shop/product.php?products_id=") != -1) {

var linkclass = Links1[h].getAttribute('class');

/*Check to make sure product is not from the "what's new" section.*/
if(linkclass == 'thumbnail-link') {
strarryPL1.push(Links1[h].href);
}
}
}

/*Sort the array putting all dupes together.*/
strarryPL1.sort();

/*Create a temporary array to hold the links.*/
var temp = new Array();

/*Check for dupes*/
for(var i = 0; i < strarryPL1.length; i++) {
/*If dupe, ignore*/
if(strarryPL1[i] == strarryPL1[i+1]) {
continue;
}

/*else add it to temp array*/
temp.push(strarryPL1[i]);
}

/*Debug
/*Output contents of array to console.*/
temp.toString();

/*Loop through the non duped links
opening them in a new tab.*/
for(var j = 0; j < temp.length; j++) {
window.open(temp[j], "_blank");
}
})();[/code]
Posted 10 years ago
Damn, you are GOOD, as alwaus DM...!
Posted 10 years ago · Author
hidrocalida wrote:
Damn, you are GOOD, as alwaus DM...!


Thank you :) Got any ideas for more bookmarklets/scripts?

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
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts