MyAnimeList.net: All My Friend's Entries

Add the "All My Friend's Entries" box from the stats page in anime or manga details.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name            MyAnimeList.net: All My Friend's Entries
// @version         0.1.2
// @description	    Add the "All My Friend's Entries" box from the stats page in anime or manga details.
// @include         https://myanimelist.net/anime*
// @include         https://myanimelist.net/manga*
// @namespace       https://greasyfork.org/users/134346
// ==/UserScript==

(function() { if (typeof jQuery == 'undefined') $ = unsafeWindow.$;

var pos = $('h2:contains(Reviews)');
if (!pos.length) return;

var curlink = window.location.toString();
var statslink = '';
if (curlink.lastIndexOf('?') != -1) {statslink = curlink.substring(0, curlink.lastIndexOf('?')) + '/stats';}
else {statslink = curlink + '/stats';}

$.get(statslink, function (data) {
	var link = $('a[name=members]', $(data).children());
	if (!link) return;
	var next = link.nextAll();
	pos.before(link).before(next);
	if (next.length == 1)
		pos.before($('<div style="margin:10px 0"/>').append('No users found with this Anime/Manga in their list.')).before('<br/>');
});

})();