MyFigureCollection+

Makes MFC Great Again!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         MyFigureCollection+
// @namespace    https://github.com/awhitetiger/myfigurecollectionplus
// @version      0.1
// @description  Makes MFC Great Again!
// @author       OwO
// @include      https://myfigurecollection.net/*
// @require      https://code.jquery.com/jquery-1.12.4.min.js
// ==/UserScript==

//Settings//
var profileHomepage = false; //Do you want to change your profile to your MFC homepage?
var globalBG = true; //Do you want a custom background for all pages?
var BGUrl = "https://i.imgur.com/nDfpzDB.jpg"; //If so what is it?
var profileBG = false; //Do you want the global background to overwrite your profiles?
//End of Settings//

//Changes thumbnails of figures in the catalog to full figure
(function() {
    if (window.location.href.includes("item"))
        return false;
    var imgs = document.getElementsByTagName("img");
    for (i = 0; i < imgs.length; i++) {
        var slug = imgs[i].src;
        if(slug.includes("/figure/")){
            //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.
            var newSlugBig = [slug.slice(0, 49), "/big", slug.slice(49)].join('');
            imgs[i].src = newSlugBig;
        }
    }
})();

//Kinda dumb function, makes it so you automatically go to your profile if you're on the homepage
(function() {
    if (window.location.href == "https://myfigurecollection.net/" && profileHomepage == true) {
        var username = $('.username.desktop').html();
        window.location.href = "https://myfigurecollection.net/profile/" + username;
    }
})();

//background stuff
(function() {
    if (window.location.href.includes("profile") && profileBG == false || globalBG == false)
        return false;
    $('#ref-top').attr("style","background:#eeeeee url("+BGUrl+") no-repeat fixed");
})();

//Price Converter
(function() {
    //Remove convert to USD button & convert.
    var rConvert = document.getElementsByTagName("a");
    for (i = 0; i < rConvert.length; i++) {
        if (rConvert[i].innerHTML == "convert into USD") {
            rConvert[i].innerHTML = "";
            //Converts JPY to USD
            var yPrice = $('.item-price').html().replace("¥","").replace(",","");
            var uPrice = "$" + yPrice * 0.0090;
            $('.item-price').html(uPrice);
        }
    }
})();