Skip to content

Instantly share code, notes, and snippets.

@prafulfillment
Created December 3, 2014 04:43
Show Gist options
  • Save prafulfillment/a03ab212371625a515a1 to your computer and use it in GitHub Desktop.
Save prafulfillment/a03ab212371625a515a1 to your computer and use it in GitHub Desktop.
Replace Github code block css with the style Slack uses. (Use TamperMonkey on Chrome or GreaseMonkey on Firefox)
// ==UserScript==
// @name Replace Github code style
// @namespace https://www.derivatived.com/
// @version 0.1
// @description Remove all Pulse stories from LinkedIn news feed
// @match https://github.com/*
// @copyright 2014, Praful Mathur
// ==/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);
}
var code_css = ".markdown-body code, .markdown-body tt { \
color: #c25; \
background-color: #f7f7f9; \
border: 1px solid #e1e1e8; \
border-radius: 3px; \
}"
addGlobalStyle(code_css);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment