// ==UserScript== // @name MANGA Plus: Remove Certain Comments // @namespace https://greasyfork.org/ // @match https://mangaplus.shueisha.co.jp/comments/* // @grant none // @version 0.1 // @license MIT // @author 無罪 // @description Remove comments according to a list of filters. // @downloadURL none // ==/UserScript== (async function() { 'use strict'; var comment = document.getElementsByClassName("CommentItem-module_body_8LyBg"); function removeComments(filter) { var susString = filter; var susComments = 0; for (var i = 0; i < comment.length; i++) { if (susString.test(comment[i].innerText.normalize("NFKC").toLowerCase())) { comment[i].parentElement.remove(); susComments++; } } console.log(susComments + " comments removed"); } var loopCount = 0; var loopFunc = setInterval(function(){ removeComments(/word 1|word 2|word 3/); loopCount++; if(loopCount == 10) { clearInterval(loopFunc); console.log("Stop clearing"); } },1000); })();