Advertisement
TIM-DM

Generate Clickable Product Icon Bookmarklet

Aug 18th, 2013
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. Are you a developer? Do you make IMVU layouts? Are you someone who wants an easy way to generate clickable product icons? Well look no further! I have made a bookmarklet that will let you do just that!
  2.  
  3. Description
  4. ---------------------
  5. A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser's functionality. For instance, a bookmarklet might allow the user to select text on a page, click the bookmarklet, and be presented with a search engine results page for the search term selected.
  6.  
  7. Installation
  8. ---------------------
  9. Installation of a bookmarklet is performed by creating a new bookmark, and pasting the code into the URL destination field. Alternatively, if the bookmarklet is presented as a link, under some browsers it can be dragged and dropped onto the bookmark bar. The bookmarklet can then be run by loading the bookmark normally.
  10.  
  11. HTML Bookmarklet
  12. ---------------------
  13. This bookmarklet will generate HTML code for a clickable product icon that takes you to the product page for using in layouts or other websites.
  14.  
  15. javascript: (function generateHTMLCode() {
  16. /*Get the product page url*/
  17. var strURL = document.URL;
  18.  
  19. if(strURL != "" && strURL.indexOf("http://www.imvu.com/shop/product.php?products_id=") != -1) {
  20. /*Get the product icon url*/
  21. var strIMGURL = document.getElementById("product-image").src;
  22.  
  23. /*Generate the BBCode and alert it to the user for copying*/
  24. window.prompt ("HTML Code:","<a href='" + strURL + "' target='_blank'><img src='" + strIMGURL + "'/></a>");
  25. }
  26. })();
  27.  
  28. BBCode Bookmarklet
  29. ---------------------
  30. This bookmarklet will generate BBCode for a clickable product icon that takes you to the product page for posting on forums like ours and IMVU.
  31.  
  32. javascript: (function generateBBCode() {
  33. /*Get the product page url*/
  34. var strURL = document.URL;
  35.  
  36. if(strURL != "" && strURL.indexOf("http://www.imvu.com/shop/product.php?products_id=") != -1) {
  37. /*Get the product icon url*/
  38. var strIMGURL = document.getElementById("product-image").src;
  39.  
  40. /*Generate the BBCode and alert it to the user for copying*/
  41. window.prompt ("BBCode:","[url=" + strURL + "][img]" + strIMGURL +"[/img][/url]");
  42. }
  43. })();
  44.  
  45.  
  46.  
  47. For more free IMVU stuff, check out these sites:
  48. ------------------------------------------------
  49. http://tim-dm.deviantart.com
  50. http://imvufiles.tumblr.com/
  51. http://www.imvumafias.org/community/viewtopic.php?f=33&t=8932
  52. http://www.imvumafias.org/community/buysell/
  53. http://pastebin.com/iWH07Fbe
  54. http://www.imvumafias.org/community/tutorials/
  55. http://www.imvumafias.org/community/clubs.php?mode_clubs=info&cid=11
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Keywords
  64. ---------
  65. imvu, imvu icon, imvu code, javascript, script, imvu script, imvu tool, bookmarklet, imvumafias, gray market, imvu developer, dev, developing, developer, creating, creator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement