MyAnimeList Score Hider

MAL scores may be a good indicator, but the nitty-gritty stuff is cancerous. Reduce the meaningless score to something easy to understand.

  1. // ==UserScript==
  2. // @name MyAnimeList Score Hider
  3. // @namespace https://example.com
  4. // @version 2016.11.05
  5. // @description MAL scores may be a good indicator, but the nitty-gritty stuff is cancerous. Reduce the meaningless score to something easy to understand.
  6. // @author Bananaman
  7. // @match https://myanimelist.net/anime/*
  8. // @match https://myanimelist.net/anime.php?id=*
  9. // @grant none
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. (function($) {
  14. var $score = $(".score");
  15. // Get score, store in variable and strip whitespace.
  16. var scoreText = $score.text();
  17. scoreText = scoreText.replace(/\s+/g, '');
  18. // Remove the score from the DOM.
  19. $score.text("");
  20. // Get the CSS done now.
  21. $score.css("cursor", "pointer");
  22. // Figure out verdict for show.
  23. var verdict;
  24. switch (true) {
  25. case (scoreText >= 7):
  26. verdict = "Gud";
  27. break;
  28. case (scoreText >= 5):
  29. verdict = "Meh";
  30. break;
  31. default:
  32. verdict = "Bad";
  33. break;
  34. };
  35. // Insert the divs.
  36. var $verdictDiv = $("<div>");
  37. $verdictDiv.attr("id", "verdict");
  38. $verdictDiv.text(verdict);
  39. $score.append($verdictDiv);
  40. var $scoreDiv = $("<div>");
  41. $scoreDiv.attr("id", "score");
  42. $scoreDiv.css({
  43. "display": "none"
  44. });
  45. $scoreDiv.text(scoreText)
  46. $score.append($scoreDiv);
  47. // Add the event listener.
  48. $score.on("click", "div", function() {
  49. $(this).hide().siblings().show();
  50. })
  51. })(jQuery)

QingJ © 2025

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