Skip to content

Instantly share code, notes, and snippets.

@iambibhas
Created May 9, 2015 17:42
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 iambibhas/7dba6f2942cf4f7587c1 to your computer and use it in GitHub Desktop.
Save iambibhas/7dba6f2942cf4f7587c1 to your computer and use it in GitHub Desktop.
Make Slack's <pre> <code> use Consolas font
// ==UserScript==
// @name Slack Better Motospace Font
// @namespace slackmonofont
// @include https://*.slack.com/*
// @version 1
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
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('pre { font-family: Consolas, monospace !important; }');
addGlobalStyle('code { font-family: Consolas, monospace !important; }');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment