MyFigureCollection+

Makes MFC Great Again!

  1. // ==UserScript==
  2. // @name MyFigureCollection+
  3. // @namespace https://github.com/awhitetiger/myfigurecollectionplus
  4. // @version 0.1
  5. // @description Makes MFC Great Again!
  6. // @author OwO
  7. // @include https://myfigurecollection.net/*
  8. // @require https://code.jquery.com/jquery-1.12.4.min.js
  9. // ==/UserScript==
  10.  
  11. //Settings//
  12. var profileHomepage = false; //Do you want to change your profile to your MFC homepage?
  13. var globalBG = true; //Do you want a custom background for all pages?
  14. var BGUrl = "https://i.imgur.com/nDfpzDB.jpg"; //If so what is it?
  15. var profileBG = false; //Do you want the global background to overwrite your profiles?
  16. //End of Settings//
  17.  
  18. //Changes thumbnails of figures in the catalog to full figure
  19. (function() {
  20. if (window.location.href.includes("item"))
  21. return false;
  22. var imgs = document.getElementsByTagName("img");
  23. for (i = 0; i < imgs.length; i++) {
  24. var slug = imgs[i].src;
  25. if(slug.includes("/figure/")){
  26. //var newSlugLarge = [slug.slice(0, 49), "/large", slug.slice(49)].join(''); --Really weird, some figures have a large verison where others don't, however, every product has a "Big" Version.
  27. var newSlugBig = [slug.slice(0, 49), "/big", slug.slice(49)].join('');
  28. imgs[i].src = newSlugBig;
  29. }
  30. }
  31. })();
  32.  
  33. //Kinda dumb function, makes it so you automatically go to your profile if you're on the homepage
  34. (function() {
  35. if (window.location.href == "https://myfigurecollection.net/" && profileHomepage == true) {
  36. var username = $('.username.desktop').html();
  37. window.location.href = "https://myfigurecollection.net/profile/" + username;
  38. }
  39. })();
  40.  
  41. //background stuff
  42. (function() {
  43. if (window.location.href.includes("profile") && profileBG == false || globalBG == false)
  44. return false;
  45. $('#ref-top').attr("style","background:#eeeeee url("+BGUrl+") no-repeat fixed");
  46. })();
  47.  
  48. //Price Converter
  49. (function() {
  50. //Remove convert to USD button & convert.
  51. var rConvert = document.getElementsByTagName("a");
  52. for (i = 0; i < rConvert.length; i++) {
  53. if (rConvert[i].innerHTML == "convert into USD") {
  54. rConvert[i].innerHTML = "";
  55. //Converts JPY to USD
  56. var yPrice = $('.item-price').html().replace("¥","").replace(",","");
  57. var uPrice = "$" + yPrice * 0.0090;
  58. $('.item-price').html(uPrice);
  59. }
  60. }
  61. })();