GitHub Wide Markdown

A lightweight UserScript that removes narrow layout; expands GitHub Markdown (*.md) files to full‑width for easier reading and better use of screen space.

安裝腳本?
作者推薦腳本

您可能也會喜歡 MySubs Best Subtitle Highlighter

安裝腳本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         GitHub Wide Markdown
// @namespace    https://greasyfork.org/users/1002054-igorskyflyer
// @version      v1.0.1
// @description  A lightweight UserScript that removes narrow layout; expands GitHub Markdown (*.md) files to full‑width for easier reading and better use of screen space.
// @author       igorskyflyer
// @date         2025-09-22
// @match        https://github.com/*.md
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @run-at       document-end
// @grant        none
// @license      GPL-3.0-or-later
// @compatible   chrome
// @compatible   firefox
// @compatible   opera
// @compatible   safari
// @compatible   edge
// @homepageURL  https://github.com/igorskyflyer/userscript-github-wide-markdown
// @supportURL   https://greasyfork.org/scripts/550390/feedback
// ==/UserScript==

// @ts-nocheck

;(() => {
  const widen = () => {
    const el = document.querySelector('article.markdown-body')

    if (!el) {
      return
    }

    el.style.setProperty('max-width', '100%', 'important')
    el.style.setProperty('margin-left', '0', 'important')
    el.style.setProperty('margin-right', '0', 'important')
  }

  widen()

  new MutationObserver(widen).observe(document.body, {
    childList: true,
    subtree: true
  })
})()