MyAnimeList.net: All My Friend's Entries

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

目前為 2017-06-20 提交的版本,檢視 最新版本

// ==UserScript==
// @name            MyAnimeList.net: All My Friend's Entries
// @version         0.1.1
// @description	    Add the "All My Friend's Entries" box from the stats page in anime 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;

$.get(window.location + '/stats', 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 in their list.')).before('<br/>');
});

})();