Fandom Focus

Restores Fandom to a clean, readable, and distraction-free layout.

// ==UserScript==
// @name         Fandom Focus
// @version      2.1.3
// @description  Restores Fandom to a clean, readable, and distraction-free layout.
// @author       samerop
// @license      MIT
// @match        https://*.fandom.com/*
// @run-at       document-start
// @grant        none
// @namespace    https://greasyfork.org/users/1426714
// ==/UserScript==

(function() {
    'use strict';

    const customCss = `
        .page__right-rail,
        #global-explore-navigation,
        .notifications-placeholder {
            display: none !important;
        }

        .main-container {
            width: 100% !important;
            margin-left: 0 !important;
        }

        .fandom-community-header__background.fullScreen {
            width: 100% !important;
        }

        body.f2-page:not(.article-editor-body):not(.no-global-nav) {
            margin-left: 0 !important;
        }

        .fandom-community-header__background.fitCenter.fullScreen::before,
        .fandom-community-header__background.fitTopLeft.fullScreen::before,
        .fandom-community-header__background.fitTopRight.fullScreen::before,
        .fandom-community-header__background.header::before {
            position: static !important;
        }
    `;

    const style = document.createElement('style');
    style.textContent = customCss;
    document.documentElement.appendChild(style);
})();