// ==UserScript==
// @name osu! pp for Scoreboard
// @description pp for Top 50 Scoreboard
// @author JebwizOscar
// @icon http://osu.ppy.sh/favicon.ico
// @include http://osu.ppy.sh/b/*
// @include https://osu.ppy.sh/b/*
// @include http://osu.ppy.sh/s/*
// @include https://osu.ppy.sh/s/*
// @include http://osu.ppy.sh/p/beatmap?*
// @include https://osu.ppy.sh/p/beatmap?*
// @require http://code.jquery.com/jquery-1.10.4.min.js
// @copyright 2014, Jeb
// @version 0.1.0.5
// @namespace https://greasyfork.org/users/3079
// @downloadURL none
// ==/UserScript==
$(function() {
$('.titlerow').append('
pp | ');
suf = $('.beatmapTab.active').attr("href").replace('/b/','?b=');
leader = $($($('.scoreLeader')[0]).children(0).children(0).children(0).children(0)[1]).attr("href").replace('/u/','&u=');
me = '&u=' + localUserId;
$.get("http://wa.vg/apis/scores.php"+suf+leader, {}, function(data) {
for(i in data){
$($('.scoreLeader')[0]).children(0).append('pp | '+data[i].pp+' pp | |
');
}
});
if ($('.scoreLeader').size()==2){
$.get("http://wa.vg/apis/scores.php"+suf+me, {}, function(data) {
for(i in data){
$($('.scoreLeader')[1]).children(0).append('pp | '+data[i].pp+' pp | |
');
}
});
}
$.get("http://wa.vg/apis/scores.php"+suf, {}, function(data) {
for(i in data){
$('[href="/u/'+data[i].user_id+'"]').last().parent().parent().append(''+data[i].pp+' | ');
}
});
});