您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Highlight the titles on the home and updates pages with different colors to show which ones you're following, dropped, etc.
// ==UserScript== // @name Mangadex - Colorize Follow Status // @namespace Violentmonkey Scripts // @match https://mangadex.org/ // @match https://mangadex.org/updates // @grant none // @version 1.1 // @author 2TspSalt // @description Highlight the titles on the home and updates pages with different colors to show which ones you're following, dropped, etc. // @noframes // ==/UserScript== (function () { // CHANGE THESE COLORS TO CUSTOMIZE! var colorStatus = [ undefined, "LawnGreen", // 1. Reading "MediumBlue", // 2. Completed "Gold", // 3. On Hold "MediumTurquoise", // 4. Plan to Read "FireBrick", // 5. Dropped "DarkMagenta", // 6. Re-Reading ]; function applyFollowStyle(data) { return function (a) { var idStr = a.href.match(/\/title\/([\d]+)\//)[1]; if (!idStr) return; var idVal = parseInt(idStr, 10); var followType = ( data.find(function (m) { return m.mangaId === idVal; }) || {} ).followType; if (!followType) return; var c = colorStatus[followType]; a.style.color = c; a.parentElement.style.color = c; }; } fetch("https://api.mangadex.org/v2/user/me/followed-manga", { credentials: "include", }) .then(function (r) { return r.json(); }) .then(function (body) { if (Array.isArray(body.data)) { Array.from(document.querySelectorAll(".manga_title")) .filter(function (a) { return a.href; }) .forEach(applyFollowStyle(body.data)); } }); })();