Styles for Markdown Viewer

Cool CSS for Markdown Viewer

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Styles for Markdown Viewer
// @namespace    muvsado
// @version      0.2.11
// @description  Cool CSS for Markdown Viewer
// @match        file:///*.md
// @match        file:///*.markdown
// @grant        GM_addStyle
// @run-at       document-start
// @license      Public Domain
// ==/UserScript==

GM_addStyle(`
    body {
        font-family: sans-serif;
    }

    p {
        margin: 15px 0;
    }

    a {
        border-bottom: 1px dotted;
        text-decoration: none;
    }

    h1, h2, h3 {
        margin: 16px 0 12px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    ul, ol {
        padding-left: 36px;
    }

    li {
        margin: 3px 0;
    }

    pre, code {
        background-color: #e0e0e0;
        font-size: 14px;
    }

    pre {
        border: 2px dotted #888;
        overflow-x: auto;
        padding: 3px;
    }

    table {
        border-collapse: collapse;
    }

    table td, th {
        border: 1px solid #cccccc;
        padding: 5px 7px;
    }
`);