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 提交的版本。查看 最新版本

// ==UserScript==
// @name           MyAnimeList(MAL) - Recommendations direct link
// @version        1.0.0
// @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.
// @author         Cpt_mathix
// @include        http://myanimelist.net/anime.php?id=*
// @include        http://myanimelist.net/anime/*
// @include        http://myanimelist.net/manga.php?id=*
// @include        http://myanimelist.net/manga/*
// @exclude        http://myanimelist.net/anime/genre/*
// @exclude        http://myanimelist.net/anime/producer/*
// @exclude        http://myanimelist.net/anime/season/*
// @exclude        http://myanimelist.net/manga/genre/*
// @exclude        http://myanimelist.net/manga/magazine/*
// @exclude        http://myanimelist.net/anime/*/*/*
// @exclude        http://myanimelist.net/manga/*/*/*
// @grant        none
// @namespace https://gf.qytechs.cn/users/16080
// ==/UserScript==

var allElements;
allElements = document.evaluate(
    '//*[@id="anime_recommendation"]/div[3]/ul/li[*]',
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);

for (var i = 0; i < allElements.snapshotLength; i++) {
    var linkEl = allElements.snapshotItem(i).firstChild;
    var href = linkEl.href;
    var id = href.match(/\d+/g);
    var self = document.location.href.match(/\d+/g)[0];
    linkEl.href = href.replace(self,'').replace('-','').replace('\/recommendations','');
}

QingJ © 2025

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