Skip to content

Instantly share code, notes, and snippets.

@keithio
Created August 20, 2011 19:22
Show Gist options
  • Save keithio/1159525 to your computer and use it in GitHub Desktop.
Save keithio/1159525 to your computer and use it in GitHub Desktop.
Gist in Tumblr
.gist {
line-height: 1.3em !important;
overflow: auto !important;
}
.gist .gist-file {
border: 0 !important;
}
.gist-data {
background: #fcfcfc url('http://static.tumblr.com/nzis4lb/vaVlq7fcv/right-bg.gif');
border: 1px solid #f0f0f0 !important;
padding: 1em !important;
}
.gist {
font-size: 11px !important;
font-family: "Droid Sans Mono", "Lucida Sans Unicode", monospace !important;
background: transparent !important;
padding: 0 !important;
}
.gist-meta {
font-size: 10px !important;
background: transparent !important;
}
.gist-meta a, .gist-meta a:visited {
color: #0763ba;
}
.gist-highlight pre {
font-family: "Droid Sans Mono", "Lucida Sans Unicode", monospace !important;
}
a[href^="https://gist.github.com"] {
display: none;
}
.gist-meta a[href^="https://gist.github.com"] {
display: inline;
}
.gist {
margin: 0 0 -15px 0;
}
<script type="text/javascript">
$(function() {
var gist_injectors = $.map($('a[title="gist"]').get(), (function(p) {
return function() {
gist_injectors.shift();
var gist_id = $(p).attr('href').replace(/.*gist.github.com\//g,'');
document.write = function(gist_style_link) {
$('head').append(gist_style_link);
document.write = function(gist_html) {
$(p).replaceWith(gist_html);
if (gist_injectors[0])
gist_injectors[0]();
};
};
$(document.body).append('<scr'+'ipt src="http://gist.github.com/'+gist_id+'"></scr'+'ipt>');
};
$('a[title="gist"]').hide();
}));
if (gist_injectors[0])
gist_injectors[0]();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment