Created
December 6, 2018 16:22
-
-
Save kf6kjg/7f27c1d4beab58036c2e1facb540255c to your computer and use it in GitHub Desktop.
Nice formatting of TXT files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Nice formatting of TXT files | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Format online text files in a clean and easy to read way without losing fixed width needs. | |
// @author Ricky Curtice | |
// @match *://*/*.txt | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Your code here... | |
let el = document.querySelector("body > pre"); | |
if (el) { | |
el.style.fontSize = "14pt"; | |
el.style.marginLeft = "auto"; | |
el.style.marginRight = "auto"; | |
el.style.width = "44em"; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment