您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Allows the user to hide specific titles from the mangadex update page permanently by clicking the icon to the right of the title.
// ==UserScript== // @name MangaDex Update Hider // @namespace MDHider // @version 1.0 // @description Allows the user to hide specific titles from the mangadex update page permanently by clicking the icon to the right of the title. // @author MadHatter // @match https://mangadex.org/updates* // @grant GM_setValue // @grant GM_getValue // @require https://code.jquery.com/jquery-3.5.1.min.js // @run-at document-end // ==/UserScript== const KEY = 'MD_FILTER_KEY'; (function() { 'use strict'; addIcons(); filterPage(); })(); function addIcons() { let titles = document.getElementsByClassName("manga_title"); for(const title of titles){ title.parentElement.append(createBanIcon()); } } function filterPage() { let titles = GM_getValue(KEY, []); for (const title of titles) { hideMe(title); } } function createBanIcon(){ let ban = document.createElement("span"); ban.className = "fas fa-ban"; ban.style = "margin-left: 5px;" ban.onclick = () => { let title = ban.previousElementSibling.title; hideMe(title); addBanToStorage(title); }; return ban; } function addBanToStorage(title){ let titles = GM_getValue(KEY, []); if(title){ titles.push(title); GM_setValue(KEY, titles); console.log(`${title} has been saved to storage`); } } function hideMe(title){ let parent_row = $('[title="'+title+'"]').parentsUntil('tbody','tr'); let rows = parent_row.nextAll(); let found = false; let row; let child; $(parent_row).hide(); for(row of rows){ for(child of $(row).children()){ if($(child).find("div").attr('class')=='medium_logo rounded'){ found = true; break; } } if(found){ break; } $(row).hide(); } }