MyAnimeList(MAL) - Recommendations direct link

When you click on a recommendation picture in a anime/manga page, you go directly to the anime/manga and not the recommendation page.

目前为 2016-04-09 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name MyAnimeList(MAL) - Recommendations direct link
  3. // @version 1.0.0
  4. // @description When you click on a recommendation picture in a anime/manga page, you go directly to the anime/manga and not the recommendation page.
  5. // @author Cpt_mathix
  6. // @include http://myanimelist.net/anime.php?id=*
  7. // @include http://myanimelist.net/anime/*
  8. // @include http://myanimelist.net/manga.php?id=*
  9. // @include http://myanimelist.net/manga/*
  10. // @exclude http://myanimelist.net/anime/genre/*
  11. // @exclude http://myanimelist.net/anime/producer/*
  12. // @exclude http://myanimelist.net/anime/season/*
  13. // @exclude http://myanimelist.net/manga/genre/*
  14. // @exclude http://myanimelist.net/manga/magazine/*
  15. // @exclude http://myanimelist.net/anime/*/*/*
  16. // @exclude http://myanimelist.net/manga/*/*/*
  17. // @grant none
  18. // @namespace https://gf.qytechs.cn/users/16080
  19. // ==/UserScript==
  20.  
  21. var allElements;
  22. allElements = document.evaluate(
  23. '//*[@id="anime_recommendation"]/div[3]/ul/li[*]',
  24. document,
  25. null,
  26. XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
  27. null);
  28.  
  29. for (var i = 0; i < allElements.snapshotLength; i++) {
  30. var linkEl = allElements.snapshotItem(i).firstChild;
  31. var href = linkEl.href;
  32. var id = href.match(/\d+/g);
  33. var self = document.location.href.match(/\d+/g)[0];
  34. linkEl.href = href.replace(self,'').replace('-','').replace('\/recommendations','');
  35. }

QingJ © 2025

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