Hide quotes from ignored users.
Versione datata
// ==UserScript==
// @name Quotes Filter - MAL
// @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version 1
// @description Hide quotes from ignored users.
// @author hacker09
// @match https://myanimelist.net/forum/?topicid=*
// @match https://myanimelist.net/editprofile.php?go=forumoptions
// @icon https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://myanimelist.net&size=64
// @run-at document-end
// @grant GM_setValue
// @grant GM_listValues
// ==/UserScript==
(function() {
'use strict';
if (location.href.match('topicid') === null) //If the user is on the forum settings page
{ //Starts the if condition
setTimeout(function() {
document.querySelectorAll("ul.ignored-user-list > li > a:nth-child(2)").forEach(el => GM_setValue(el.innerText, 'Ignored-User')); //Store each ignored user username on tampermonkey
}, 0);
} //Finishes the if condition
if (location.href.match('topicid') !== null) //If the user is on a forum topic
{ //Starts the if condition
document.querySelectorAll("div.quotetext").forEach(function(el) { //Foreach quote
GM_listValues().forEach(el2 => el.remove()); //Remove the quote
}); //Finishes the foreach condition
} //Finishes the if condition
})();