Fandom Focus

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

Advertisement:

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

Advertisement:

// ==UserScript==
// @name         Fandom Focus
// @namespace    https://greasyfork.org/users/1426714
// @version      3.1
// @description  Restore Fandom to a clean, readable, and distraction-free layout.
// @author       https://greasyfork.org/users/1426714
// @match        *://*.fandom.com/*
// @run-at       document-start
// @grant        none
// @icon         https://www.fandom.com/favicon.ico
// ==/UserScript==

(function() {
    const style = document.createElement('style');
    style.textContent = `
        #global-explore-navigation,
        #onetrust-consent-sdk,
        .page__right-rail,
        #age-gate,
        .AgeGateDialog-module_modal__huX7o,
        .notifications-placeholder {
            display: none !important;
        }

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

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

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

        .fandom-community-header__background.fitCenter {
            background-size: cover !important;
        }

        .app-wrapper {
            margin-left: 0 !important;
            max-width: none !important;
        }

        .base-layout-wrapper {
            margin-left: 0 !important;
        }
    `;
    (document.head || document.documentElement).appendChild(style);
})();