FitGirl Repacks - Full Width Fix

Unsets max-width and margins for header and page div to make the site full-width.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         FitGirl Repacks - Full Width Fix
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Unsets max-width and margins for header and page div to make the site full-width.
// @author       YoȻaptain Jøhn “Søap” MacTavishu
// @match        https://fitgirl-repacks.site/*
// @exclude      https://fitgirl-repacks.site/hypervisor-guide/
// @exclude      https://fitgirl-repacks.site/popular-repacks/
// @grant        none
// @license      CC-BY-NC-SA-4.0
// @run-at       document-start
// ==/UserScript==
(
    function()
    {
        'use strict';

        // Function to inject CSS into the document head
        function addGlobalStyle(css)
        {
            var head, style;
            head = document.getElementsByTagName('head')[0];
            if (!head)
            {
                return;
            }
            style = document.createElement('style');
            style.type = 'text/css';
            style.innerHTML = css;
            head.appendChild(style);
        }

        // Define all CSS rules
        var cssChanges = `
            /* 1. Unset Max-width for header and main page container */
            header, #page.hfeed.site
            {
                max-width: none !important;
                width: 100% !important;
            }

            /* 2. Unset margins on specific media queries for the page container */
            @media screen and (min-width: 1080px)
            {
                #page.hfeed.site
                {
                    margin-left: 0 !important;
                }
            }

            @media screen and (min-width: 1008px)
            {
                #page.hfeed.site
                {
                    margin-right: 0 !important;
                }
            }

            /* 3. Specific width and max-width for content elements */
            .site-content .entry-header,
            .site-content .entry-content,
            .site-content .entry-summary,
            .site-content .entry-meta,
            .page-content
            {
                width: 1330px !important;
                max-width: 9000px !important;
            }

            /* 4. Sidebar positioning and sizing */
            #content-sidebar
            {
                margin-left: -56% !important;
                width: 15% !important;
            }

            /* 5. Flexbox display for navigation links */
            .nav-links
            {
                display: flex !important;
            }

            /* 6. Post Navigation styling (Global reset + specific width/margin) */
            .navigation.post-navigation
            {
                margin: 0 !important;
                margin-left: 230px !important;
                width: 100% !important;
            }
        `;

        // Execute the function
        addGlobalStyle(cssChanges);

    }
)
();