Hentai login unlocker

Bypasses login requirements for commonly indexed hentai/nsfw comic sites.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Hentai login unlocker
// @namespace   https://sleazyfork.org/users/581142
// @license     agpl-3.0-only
// @include     /^https?:\/{2}(?:(?:(?:im|n)hentai|comicporn)\.x{3}|hentai(?:e(?:ra|nvy)|zap|rox)\.com)\//
// @grant       none
// @version     1.0.3
// @description Bypasses login requirements for commonly indexed hentai/nsfw comic sites.
// ==/UserScript==
// jshint esversion: 11

const split = globalThis.String.prototype.split
globalThis.String.prototype.split = function (separator, limit) {
	const out = split.call(this, separator, limit)

	if (out[0] === 'not_logged')
		out[0] = 'success'

	return out
}

for (const filter of globalThis.document.querySelectorAll('.filtered, .a_filtered, .filtered_reader, .blacklisted, .blacklisted_reader')) {
	filter.className = undefined
	filter.classList = globalThis.document.body.classList

	if (globalThis.location.hostname === 'nhentai.xxx')
		for (const child of filter.children)
			if (child.nodeName === 'IMG')
				child.src = child.attributes.getNamedItem('data-src').value
}

if (globalThis.location.hostname === 'hentairox.com')
	(async () => {
		await $.ready
		const keydowns = $._data(document, 'events').keydown.filter(i => i.guid !== 21)
		$(document).off('keydown')
		for (const keydown of keydowns)
			$(document).keydown(keydown.handler)
	})()