FitGirl Repacks - Full Width Fix

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

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

// ==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);

    }
)
();