Hide forum topics that aren't episodes/chapters discussion topics by default on anime/manga pages to avoid spoilers. Hover the mouse over the Forum Topic title to see the original title
当前为
// ==UserScript==
// @name Forum Spoilers Hider - MAL
// @namespace HideForumSpoilers
// @version 0.0.1
// @description Hide forum topics that aren't episodes/chapters discussion topics by default on anime/manga pages to avoid spoilers. Hover the mouse over the Forum Topic title to see the original title
// @author hacker09
// @match https://myanimelist.net/anime/*
// @match https://myanimelist.net/manga/*
// @icon https://www.google.com/s2/favicons?domain=myanimelist.net
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
var SavedTopicTitles = []; //Creates a new global array
document.querySelectorAll("#forumTopics > tbody > tr > td:nth-child(2) > a").forEach(function(el, index) { //For each forum topic title
SavedTopicTitles.push(el.innerText); //Add the topic title to the array
if (el.innerText.match(/Episode|Chapter \d+ Discussion/) === null) //If the topic title isn't an episode or chapter discussion topic
{ //Starts the if condition
el.onmouseover = function() { //When the text 'Topic Title Hidden to Prevent Spoilers' is hovered
el.innerText = SavedTopicTitles[index]; //Show the real topic title
} //Finishes the onmouseover event listener
el.innerText = 'Hidden Title'; //Change all non chapter/episode discussion topics title text to 'Topic Title Hidden to Prevent Spoilers'
el.onmouseout = function() { //When the real topic title stop being hovered
el.innerText = 'Hidden Title'; //Hide the real topic title again
} //Finishes the onmouseout event listener
} //Finishes the if condition
}); //Finishes the foreach condition
})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址