osu! Profile Detail

Show some API stats in profile page

当前为 2015-03-13 提交的版本,查看 最新版本

// ==UserScript==
// @name           osu! Profile Detail
// @description    Show some API stats in profile page
// @author         JebwizOscar
// @icon           http://osu.ppy.sh/favicon.ico
// @include        http://osu.ppy.sh/u/*
// @include        https://osu.ppy.sh/u/*
// @grant          GM_xmlhttpRequest
// @grant          GM_openInTab
// @grant          GM_setValue
// @grant          GM_getValue
// @version        1.6.0.0057
// @namespace      https://gf.qytechs.cn/users/3079
// ==/UserScript==
var ver = 57;
var pz = document.getElementsByClassName("prof-right")[0];
var code = document.documentElement.innerHTML;
var udt = code.match("var localUserId = ([0-9]+)");
var prefix = document.location.protocol + "//osupd.og.gs/";
// freenom suspended the old domain
if (code.match("var userId = ([0-9]+)")){
    var uid = code.match("var userId = ([0-9]+)")[1];
    var e = code.match("var activeGameMode = ([0-9])")[1];
    if (null !== udt) {
        ud = udt[1];
        udstr = "&ud=" + ud;
    } else {
        ud = "0";
        udstr = "";
    }
    function main() {
        qstr = "sv=" + ver + udstr;
        var a, b;
        a = document.getElementsByTagName("head")[0];
        b = document.createElement("style");
        b.type = "text/css";
        b.innerHTML = ".unexpanded { display:none; }";
        a.appendChild(b);
        GM_xmlhttpRequest({
            method: "GET",
            url: prefix + "pf_det.php?" + qstr + "&u=" + uid + "&m=" + e,
            headers: {
                Referer: location.href
            },
            onload: function(a) {
                var c, b = a.responseText;
                pz.innerHTML += '<table class="beatmapListing" id="api" cellspacing="0" >' + b + '</table>';
                script = document.createElement("script");
                script.innerHTML = 'var sv=' + ver;
                document.body.appendChild(script);
                GM_xmlhttpRequest({
                    method: "GET",
                    url: prefix + "pf_det.js",
                    headers: {
                        Referer: location.href
                    },
                    onload: function(a) {
                        var b = a.responseText;
                        script = document.createElement("script");
                        script.innerHTML = b;
                        document.body.appendChild(script);
                    }
                });
            }
        });
    
    }
    main();
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址