MyAnimeList(MAL) - Profile navigationbar

Add a navigation bar at the top of your profile

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         MyAnimeList(MAL) - Profile navigationbar
// @version      1.0.6
// @description  Add a navigation bar at the top of your profile
// @author       Cpt_mathix
// @match        https://myanimelist.net/profile/*
// @exclude      https://myanimelist.net/profile/*/*
// @grant        none
// @namespace https://greasyfork.org/users/16080
// ==/UserScript==

var user = document.getElementsByTagName('title')[0].textContent.replace("\'s Profile - MyAnimeList.net", "");

var content = document.getElementsByClassName('container-right')[0];
var navigation = document.createElement('div');

content.insertBefore(navigation, content.firstChild);

var string = '<div id="horiznav_nav" style="margin: 5px 0 10px;">';
string +=		'<ul>';
string +=			'<li><a href="/profile/' + user + '" class="horiznav_active">Home</a></li>';
string +=			'<li><a href="/profile/' + user + '/statistics">Statistics</a></li>';
string +=			'<li><a href="/profile/' + user + '/favorites">Favorites</a></li>';
string +=			'<li><a href="/profile/' + user + '/reviews">Reviews</a></li>';
string +=			'<li><a href="/profile/' + user + '/recommendations" rel="nofollow">Recommendations</a></li>';
string +=			'<li><a href="/profile/' + user + '/stacks">Interest Stacks</a></li>';
string +=			'<li><a href="/profile/' + user + '/clubs">Clubs</a></li>';
string +=			'<li><a href="/profile/' + user + '/badges">Badges</a></li>';
string +=			'<li><a href="/profile/' + user + '/friends">Friends</a></li>';
string +=		'</ul>';
string +=	'</div>';

navigation.outerHTML = string;