Created
May 9, 2015 17:42
-
-
Save iambibhas/7dba6f2942cf4f7587c1 to your computer and use it in GitHub Desktop.
Make Slack's <pre> <code> use Consolas font
This file contains hidden or 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 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