Fapeza Dark Mode

Auto dark mode for fapeza.com and all subdomains

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

// ==UserScript==
// @name         Fapeza Dark Mode
// @namespace    https://greasyfork.org/en/users/1375891-wibu-elite
// @version      1.0 (June 24, 2026)
// @description  Auto dark mode for fapeza.com and all subdomains
// @author       Kinnena
// @match        https://fapeza.com/*
// @match        https://*.fapeza.com/*
// @icon         https://cdn-icons-png.flaticon.com/512/5261/5261958.png
// @grant        none
// @license      MIT
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    const darkCSS = `
        /* ===== BASE ===== */
        html, body {
            background-color: #111111 !important;
            color: #e0e0e0 !important;
        }

        /* ===== NAVBAR & HEADER ===== */
        header,
        nav,
        .navbar,
        .navbar-default,
        .top-bar,
        .header,
        .site-header {
            background-color: #1a1a1a !important;
            border-bottom: 1px solid #333 !important;
        }

        /* ===== SIDEBAR ===== */
        .sidebar,
        aside,
        .side-panel {
            background-color: #1a1a1a !important;
        }

        /* ===== CARDS & PANELS ===== */
        .card,
        .panel,
        .box,
        .block,
        .model-block,
        .thumb,
        .item,
        .post,
        .entry,
        .content-box {
            background-color: #1e1e1e !important;
            border-color: #333 !important;
        }

        /* ===== FOOTER ===== */
        footer,
        .footer,
        .site-footer {
            background-color: #111111 !important;
            border-top: 1px solid #333 !important;
            color: #999 !important;
        }

        /* ===== LINKS ===== */
        a {
            color: #7eb8f7 !important;
        }
        a:hover {
            color: #aad4ff !important;
        }

        /* ===== BUTTONS ===== */
        .btn,
        button,
        input[type="button"],
        input[type="submit"] {
            background-color: #2a2a2a !important;
            color: #e0e0e0 !important;
            border-color: #444 !important;
        }
        .btn-primary,
        .btn-blue {
            background-color: #1a4a8a !important;
            border-color: #1a4a8a !important;
            color: #fff !important;
        }

        /* ===== INPUTS & FORMS ===== */
        input,
        textarea,
        select {
            background-color: #2a2a2a !important;
            color: #e0e0e0 !important;
            border-color: #444 !important;
        }
        input::placeholder,
        textarea::placeholder {
            color: #777 !important;
        }

        /* ===== DROPDOWNS ===== */
        .dropdown-menu,
        .menu,
        .submenu {
            background-color: #1e1e1e !important;
            border-color: #333 !important;
        }
        .dropdown-menu li a,
        .menu li a {
            color: #e0e0e0 !important;
        }
        .dropdown-menu li a:hover {
            background-color: #2a2a2a !important;
        }

        /* ===== MODALS ===== */
        .modal-content,
        .modal-header,
        .modal-body,
        .modal-footer {
            background-color: #1e1e1e !important;
            border-color: #333 !important;
            color: #e0e0e0 !important;
        }

        /* ===== TAGS & BADGES ===== */
        .tag,
        .badge,
        .label {
            background-color: #2a2a2a !important;
            color: #ccc !important;
        }

        /* ===== PAGINATION ===== */
        .pagination a,
        .pagination span,
        .page-link {
            background-color: #1e1e1e !important;
            color: #7eb8f7 !important;
            border-color: #333 !important;
        }
        .pagination .active a,
        .page-item.active .page-link {
            background-color: #1a4a8a !important;
            border-color: #1a4a8a !important;
            color: #fff !important;
        }

        /* ===== TABLES ===== */
        table, th, td {
            background-color: #1e1e1e !important;
            color: #e0e0e0 !important;
            border-color: #333 !important;
        }
        tr:nth-child(even) td {
            background-color: #242424 !important;
        }

        /* ===== SCROLLBAR ===== */
        ::-webkit-scrollbar {
            width: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #1a1a1a;
        }
        ::-webkit-scrollbar-thumb {
            background: #444;
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #666;
        }

        /* ===== MISC TEXT ===== */
        h1, h2, h3, h4, h5, h6 {
            color: #f0f0f0 !important;
        }
        p, span, li, td, th, label, div {
            color: inherit !important;
        }

        /* ===== WHITE BACKGROUNDS ===== */
        [style*="background-color: #fff"],
        [style*="background-color: white"],
        [style*="background: white"],
        [style*="background: #fff"],
        [style*="background:#fff"],
        [style*="background:white"] {
            background-color: #1e1e1e !important;
        }

        /* ===== BORDERS ===== */
        [style*="border-color: #fff"],
        [style*="border: 1px solid white"] {
            border-color: #333 !important;
        }

        /* ===== IMAGES - keep normal, don't invert ===== */
        img, video {
            filter: none !important;
        }
    `;

    // Inject CSS before page renders (run-at: document-start)
    const style = document.createElement('style');
    style.id = 'fapeza-dark-mode';
    style.textContent = darkCSS;

    // Append as soon as <head> or <html> is available
    const inject = () => {
        const target = document.head || document.documentElement;
        if (target && !document.getElementById('fapeza-dark-mode')) {
            target.appendChild(style);
        }
    };

    inject();

    // Also re-inject after DOM is ready (in case the site re-renders)
    document.addEventListener('DOMContentLoaded', inject);

    // Watch for dynamic DOM changes (SPA behavior)
    const observer = new MutationObserver(() => {
        if (!document.getElementById('fapeza-dark-mode')) {
            inject();
        }
    });

    document.addEventListener('DOMContentLoaded', () => {
        observer.observe(document.body, { childList: true, subtree: true });
    });

})();