osu! Profile Detail

Show some API stats in profile page

  1. // ==UserScript==
  2. // @name osu! Profile Detail
  3. // @description Show some API stats in profile page
  4. // @author JebwizOscar
  5. // @icon http://osu.ppy.sh/favicon.ico
  6. // @include http://osu.ppy.sh/u/*
  7. // @include https://osu.ppy.sh/u/*
  8. // @grant GM_xmlhttpRequest
  9. // @grant GM_openInTab
  10. // @grant GM_setValue
  11. // @grant GM_getValue
  12. // @version 1.6.0.0059
  13. // @namespace https://gf.qytechs.cn/users/3079
  14. // ==/UserScript==
  15. var ver = 59;
  16. var code = document.documentElement.innerHTML;
  17. var udt = code.match("var localUserId = ([0-9]+)");
  18. var prefix = document.location.protocol + "//osupd.og.gs/";
  19.  
  20. function main() {
  21. qstr = "sv=" + ver + udstr;
  22. var a, b;
  23. a = document.getElementsByTagName("head")[0];
  24. b = document.createElement("style");
  25. b.type = "text/css";
  26. b.innerHTML = ".unexpanded { display:none; }";
  27. a.appendChild(b);
  28. GM_xmlhttpRequest({
  29. method: "GET",
  30. url: prefix + "pf_det.php?" + qstr + "&u=" + uid + "&m=" + e,
  31. headers: {
  32. Referer: location.href
  33. },
  34. onload: function(a) {
  35. var c, b = a.responseText;
  36. $(".beatmapListing").append(b);
  37. $("body").append('<script> var sv=' + ver + '; </script>');
  38. GM_xmlhttpRequest({
  39. method: "GET",
  40. url: prefix + "pf_det.js",
  41. headers: {
  42. Referer: location.href
  43. },
  44. onload: function(a) {
  45. var b = a.responseText;
  46. $("body").append('<script>' + b + '</script>');
  47. }
  48. });
  49. }
  50. });
  51. }
  52.  
  53. if (code.match("var userId = ([0-9]+)")){
  54. var uid = code.match("var userId = ([0-9]+)")[1];
  55. var e = code.match("var activeGameMode = ([0-9])")[1];
  56. if (null !== udt) {
  57. ud = udt[1];
  58. udstr = "&ud=" + ud;
  59. } else {
  60. ud = "0";
  61. udstr = "";
  62. }
  63. main();
  64. }

QingJ © 2025

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