您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows alternative pp data (ppp) on osu!
当前为
// ==UserScript== // @name Perfected Performance Points // @namespace http://osu.ppy.sh/u/Kert // @description Shows alternative pp data (ppp) on osu! // @include http*://osu.ppy.sh/u/* // @include http*://osu.ppy.sh/p/pp* // @grant none // @version 1.0 // ==/UserScript== // Super mega kertastic sophisticated formula // Thanks to FullTablet http://osu.ppy.sh/u/FullTablet function GetPPP(pp){ // 20 = 1 / (1 - 0.95) return pp / 20; } // Profile pages function ProfileProc(){ // ensure the needed element loaded var a = null; while(a === null){ a = document.getElementsByClassName("profileStatLine")[0].getElementsByTagName("b")[0].getElementsByTagName("a")[0]; } var all = document.getElementsByClassName("profileStatLine")[0].getElementsByTagName("b")[0].innerHTML; var link = document.getElementsByClassName("profileStatLine")[0].getElementsByTagName("b")[0].getElementsByTagName("a")[0].outerHTML; var text = ''; for (var i = link.length+2; i < all.length; i++){ text += all[i]; } // skip non-players if(text != "-"){ var arr = text.split('pp'); var pp = arr[0].replace(",", ""); var ppp = GetPPP(pp); var rounded = Math.round(ppp); var res = link + ": " + rounded + "ppp / " + arr[0] + "pp " + arr[1]; document.getElementsByClassName("profileStatLine")[0].getElementsByTagName("b")[0].innerHTML = res; document.getElementsByClassName("profileStatLine")[0].getElementsByTagName("b")[0].setAttribute("title", ppp +"ppp"); } } // Performance ranking page function PerformanceProc(){ var tables = document.getElementsByClassName("beatmapListing")[0].getElementsByTagName("tr"); for(var i = 1; i < tables.length; i++){ var curTable = document.getElementsByClassName("beatmapListing")[0].getElementsByTagName("tr")[i]; var old = curTable.getElementsByTagName("td")[4].getElementsByTagName("span")[0].innerHTML; var arr = old.split('pp'); var pp = arr[0].replace(",", ""); var ppp = GetPPP(pp); var rounded = Math.round(ppp); var res = rounded + "ppp / " + arr[0] + "pp"; curTable.getElementsByTagName("td")[4].getElementsByTagName("span")[0].innerHTML = res; curTable.getElementsByTagName("td")[4].setAttribute("title", ppp +"ppp"); } } window.addEventListener("load", function(e) { // Selecting which function to use if(document.URL.match(/http.:\/\/osu\.ppy\.sh\/u\//i)) ProfileProc(); else PerformanceProc(); }, false);