F95 Redesign

F95Zone Redesign

目前为 2024-12-24 提交的版本。查看 最新版本

// ==UserScript==
// @name         F95 Redesign
// @namespace    https://github.com/wandersons13/F95-Redesign
// @version      0.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
// ==/UserScript==

(function () {
    'use strict';

    const style = document.createElement('style');
    style.innerHTML = `
        .pageContent {
            max-width: ${window.innerWidth * 0.95}px !important;
            max-height: 360px !important;
            transition: none !important;
            top: 110px !important;
        }

        .p-body-inner {
            max-width: ${window.innerWidth * 0.95}px !important;
            transition: none !important;
        }

        .p-nav-inner {
            max-width: ${window.innerWidth * 0.95}px !important;
            transition: none !important;
        }

        .cover-hasImage {
            height: 360px !important;
            transition: none !important;
        }

        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;
        }
    `;
    document.head.appendChild(style);

    const links = document.querySelectorAll('a');
    links.forEach(link => {
        if (link.href.includes("/unread?new=1")) {
            const buttonText = link.querySelector('.button-text');
            if (buttonText) {
                buttonText.style.setProperty('color', 'cyan', 'important');
                buttonText.style.fontWeight = 'bold';
                buttonText.style.textShadow = '1px 1px 2px black';
            }
        }
    });
})();