osu! Activity Hover Details

Hover on Recent Activities / Best Performance to see score details

  1. // ==UserScript==
  2. // @name osu! Activity Hover Details
  3. // @description Hover on Recent Activities / Best Performance to see score details
  4. // @author JebwizOscar
  5. // @icon http://osu.ppy.sh/favicon.ico
  6. // @include https://osu.ppy.sh/u/*
  7. // @include http://osu.ppy.sh/u/*
  8. // @require http://code.jquery.com/ui/1.10.4/jquery-ui.js
  9. // @require http://code.jquery.com/jquery-1.11.1.min.js
  10. // @copyright 2014, Jeb
  11. // @version 0.1.2.10
  12. // @namespace https://gf.qytechs.cn/users/3079
  13. // ==/UserScript==
  14. function addStyle(style) {
  15. var head = document.getElementsByTagName("head")[0];
  16. var ele = head.appendChild(window.document.createElement( 'style' ));
  17. ele.innerHTML = style;
  18. return ele;
  19. }
  20. addStyle('@import "//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/themes/base/jquery-ui.css"');
  21. $(function() {
  22. $( document ).tooltip({
  23. items: ".event, .prof-beatmap",
  24. content: function(){
  25. var element = $( this );
  26. if (typeof(element.attr("title"))=="undefined"){
  27. $( ".event" ).click(function() {
  28. element=$(this);
  29. if (typeof(element.attr("title"))=="undefined"){
  30. u=userId;
  31. b=element.children(0).last()[0].outerHTML.replace(/((.|\n)+)\/b\/(\d+)((.|\n)+)/,"$3");
  32. m=element.children(0).last()[0].outerHTML.replace(/((.|\n)+)\/b\/(\d+)\?m=(\d+)((.|\n)+)/,"$4");
  33. $.get("http://wa.vg/apis/tooltip.php", {
  34. 'm':m,'u':u,'b':b
  35. }, function(data) {
  36. element.attr("title",data);
  37. });
  38. element.attr("title","Loading...");
  39. return "Loading...";
  40. }
  41. });
  42. $( ".prof-beatmap" ).click(function() {
  43. element=$(this);
  44. if (element.attr("id").indexOf("performance")==0){
  45. if (typeof(element.attr("title"))=="undefined"){
  46. u=userId;
  47. cd=$(element.children(0).children(0).children(0).children(0).children(0)[0]).children(0)[1].innerHTML;
  48. m=cd.replace(/<a href="\/b\/.*?\?m=(.*?)">.*/,"$1");
  49. b=cd.replace(/<a href="\/b\/(.*?)\?m=.*?">.*/,"$1");
  50. $.get("http://wa.vg/apis/tooltip.php", {
  51. 'm':m,'u':u,'b':b
  52. }, function(data) {
  53. element.attr("title",data);
  54. });
  55. element.attr("title","Loading...");
  56. return "Loading...";
  57. }
  58. }else return element.attr("title");
  59. ;
  60. });
  61. return "Click on a score to load";
  62. }else return element.attr("title");
  63. }
  64. });
  65.  
  66. });

QingJ © 2025

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