Skip to content

Instantly share code, notes, and snippets.

@lucascosti
Created April 7, 2022 07:04
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 lucascosti/9a051f6e43bd1152a90244f7a0ca20a5 to your computer and use it in GitHub Desktop.
Save lucascosti/9a051f6e43bd1152a90244f7a0ca20a5 to your computer and use it in GitHub Desktop.
Violentmonkey script for slightly bumping up the font size when editing code on GitHub on my M1 MacBook Pro.
// ==UserScript==
// @name GitHub source editing font size on my M1 MacBook Pro.
// @description For some reason the font size is a little too small _only_ when editing in the source view.
// @author Lucas Costi
// @namespace https://lucascosti.com
// @match https://github.com/*/*/edit/*
// @match https://github.com/*/*/new/*
// @match https://gist.github.com/*/*/edit
// @match https://gist.github.com/
// @grant none
// ==/UserScript==
//
//
// The div for lines of code has the class CodeMirror-lines
const divs = document.querySelectorAll(".CodeMirror-lines");
divs.forEach((element) => {
element.style.fontSize = "13px";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment