Skip to content

Instantly share code, notes, and snippets.

@glebm
Last active September 14, 2017 14:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glebm/c6a76841160d80650c518c9a2d59265d to your computer and use it in GitHub Desktop.
Save glebm/c6a76841160d80650c518c9a2d59265d to your computer and use it in GitHub Desktop.
Light on dark centered content style for text/plain documents
// ==UserScript==
// @id TextPlainStyleDarkCentered
// @name text/plain Style Dark Centered
// @description Light on dark centered content style for text/plain documents.
// @namespace https://github.com/glebm
// @author Gleb Mazovetskiy <glex.spb@gmail.com>
// @version 1.0.1
// @match *://*/*
// @grant none
// @run-at document-end
// @homepageUrl https://gist.github.com/c6a76841160d80650c518c9a2d59265d
// @contributionURL https://etherchain.org/account/0x962644db6d8735446c1af84a2c1f16143f780184
// ==/UserScript==
(function() {
if (document.contentType !== 'text/plain') return;
const styleNode = document.createElement('style');
styleNode.textContent =
`body {
display: flex;
align-items: center;
flex-direction: column;
background-color: #111;
color: rgb(212, 212, 212);
font-size: 15px;
}`;
document.head.appendChild(styleNode);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment