Exhentai AiDetector

Detects AI generated content on e-hentai and highlights it

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Exhentai AiDetector
// @namespace    B1773rm4n
// @version      2025-12-24
// @description  Detects AI generated content on e-hentai and highlights it
// @copyright    WTFPL
// @license      WTFPL
// @source       https://github.com/B1773rm4n/Tampermonkey_Userscripts/blob/main/ehentai_AiDetector.js
// @author       B1773rm4n
// @match        https://exhentai.org/*
// @match        https://e-hentai.org/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=exhentai.org
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // If on a gallery page itself
    if (document.URL.includes("\/g\/")) {
        console.log("gallery view")
        let title = document.getElementById("gn").innerText
        let tag;
        try {
            tag = document.getElementById("ta_other:ai_generated").innerText
        } catch (err) {
            tag = ""
        }

        if (title.includes("AI Generated") || tag.includes("ai generated")) {
            document.body.style.color = "#F00"
            document.body.style.backgroundColor = "#400"
            document.getElementById("gdt").style.backgroundColor = "#400"
        }

        // redirect to exhentai

        if (window.location.toString().indexOf('e-hentai') > -1) {
            let newLocation = window.location.toString().replace('e-hentai', 'exhentai')
            window.location.replace(newLocation)
        }
    }

    // If on the overview of galleries
    if (document.URL.includes("advsearch") || document.URL.includes("tag") || document.URL.includes("popular")) {
        console.log("list view")
        // let galleryList = document.getElementsByClassName("glname")
        // this does the same as the commented line above but returns an array
        let galleryList = [...document.querySelectorAll('.glname')]

        galleryList.forEach(function (galleryItem, index) {
            if (galleryItem.innerText.toLowerCase().includes("ai generated") || galleryItem.innerText.toLowerCase().includes("ai-generated")) {
                galleryItem.parentElement.parentElement.style.backgroundColor = "#400"
            }
        })

    }

})();