Skip to content

Instantly share code, notes, and snippets.

@btbytes
Created January 30, 2024 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btbytes/e13bb52fcac9b25b43153e4dbdb64bb9 to your computer and use it in GitHub Desktop.
Save btbytes/e13bb52fcac9b25b43153e4dbdb64bb9 to your computer and use it in GitHub Desktop.
fix up css on danluu.com
// ==UserScript==
// @name make danluu.com readable
// @namespace https://www.btbytes.com/
// @version 2024-01-30
// @description make danluu.com readable
// @author Pradeep Gowda
// @match https://danluu.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
function addGlobalStyle(css) {
// source: https://somethingididnotknow.wordpress.com/2013/07/01/change-page-styles-with-greasemonkeytampermonkey/
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
};
addGlobalStyle('main { padding: 0 3em; }');
addGlobalStyle('header > strong { font-size: 20pt}');
addGlobalStyle('p { max-width: 80ch; line-height: 1.5em; font-size: 14pt; font-family: sans-serif}');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment