F95 Redesign

F95Zone Redesign

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         F95 Redesign
// @namespace    https://github.com/wandersons13/F95-Redesign
// @version      0.6.1
// @description  F95Zone Redesign
// @author       wandersons13
// @match        https://f95zone.to/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=f95zone.to
// @license      GNU
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    const style = document.createElement('style');
    style.innerHTML = `
        .pageContent {
            max-width: 95vw !important;
            max-height: 360px !important;
            transition: none !important;
            top: 110px !important;
        }
        .p-body-inner, .p-nav-inner {
            max-width: 95vw !important;
            transition: none !important;
        }
        .cover-hasImage {
            height: 360px !important;
            transition: none !important;
        }
        .highlight-unread {
            color: cyan !important;
            font-weight: bold !important;
            text-shadow: 1px 1px 2px black !important;
        }

        .p-sectionLinks,
        .uix_extendedFooter,
        .p-footer-inner,
        .view-thread.block--similarContents.block-container,
        .js-notices.notices--block.notices {
            display: none !important;
        }

        @media screen and (min-width: 1500px) {
            div#latest-page_items-wrap_inner.resource-wrap-game.grid-normal {
                grid-template-columns: repeat(5, 25%) !important;
            }
            div#latest-page_items-wrap {
                margin-left: -312px !important;
            }
            #latest-page_filter-wrap {
                margin-right: -312px !important;
                display: block !important;
            }
        }

        @media screen and (min-width: 1301px) and (max-width: 1499px) {
            div#latest-page_items-wrap_inner.resource-wrap-game.grid-normal {
                grid-template-columns: repeat(4, 20%) !important;
            }
            div#latest-page_items-wrap {
                margin-left: -45px !important;
            }
            #latest-page_filter-wrap {
                margin-left: -155px !important;
                display: block !important;
            }
        }

        @media screen and (max-width: 1300px) {
            #latest-page_filter-wrap {
                display: none !important;
            }
            div#latest-page_items-wrap {
                margin-left: 0 !important;
                margin-right: 0 !important;
                width: 100% !important;
            }
            div#latest-page_items-wrap_inner.resource-wrap-game.grid-normal {
                grid-template-columns: repeat(3, 33.33%) !important;
                justify-content: center !important;
            }
        }

        @media screen and (max-width: 768px) {
            div#latest-page_items-wrap_inner.resource-wrap-game.grid-normal {
                grid-template-columns: repeat(2, 50%) !important;
            }
        }
    `;
    document.documentElement.appendChild(style);

    const highlightUnreadLinks = () => {
        const links = document.querySelectorAll('a');
        for (const link of links) {
            const text = link.textContent.trim().toLowerCase();
            const buttonText = link.querySelector('.button-text');

            if (link.href.includes('/unread?new=1') || text === 'jump to new' || (buttonText && buttonText.textContent.trim().toLowerCase() === 'jump to new')) {
                link.classList.add('highlight-unread');
                if (buttonText) buttonText.classList.add('highlight-unread');
            }
        }
    };

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', highlightUnreadLinks, { once: true });
    } else {
        highlightUnreadLinks();
    }
})();