NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Actual nhentai Blacklist // @version 0.4 // @copyright I really don't care // @license MIT // @description A simple script that completely removes blacklisted entries (as opposed to blurring them) // @author Revy // @match https://nhentai.net/* // @grant none // @run-at document-end // ==/UserScript== (function () { if (document.getElementsByClassName('fa fa-sign-in').length == 0) { purgeDirect(); purge('blacklisted'); } var tagList = []; reloadFix(tagList); })(); //removes all blacklisted entires completely function purge(className) { var e = document.getElementsByClassName(className); while (e.length > 0) { e[0].parentNode.removeChild(e[0]); } } //removes images and links to blacklisted entires, keeping the frame function forceUnclick(className) { var e = document.getElementsByClassName(className); for (var i = 0; i < e.length; i++) { e[i].removeAttribute('href'); e[i].firstChild.removeAttribute('href'); e[i].firstChild.firstChild.removeAttribute('data-src'); } } //prevents pages from loading if entires are accessed directly function purgeDirect() { var e = document.getElementsByClassName('tags'); for (var i = 0; i < e.length; i++) { if (e[i].getElementsByClassName('blacklisted').length > 0) { document.documentElement.innerHTML = 'Page removed for blacklisted content'; } } } //if logged out and still want to remove tags function manualEntry(tags) { if (tags.length == 0) return var e = document.getElementsByClassName('gallery'); for (var i = 0; i < e.length; i++) { for (var j = 0; j < e.length; j++) { if (e[i].getAttribute('data-tags').indexOf(tags[j]) > -1) { e[i].parentNode.removeChild(e[i]); break; } } } } //it just works function reloadFix(tags) { manualEntry(tags) manualEntry(tags) manualEntry(tags) manualEntry(tags) manualEntry(tags) }