Created
September 17, 2010 19:36
-
-
Save hoverbird/584797 to your computer and use it in GitHub Desktop.
This file contains 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
/*-------- Here's how your Gists render in #newtwitter's details pane --------*/ | |
twttr.mediaType('twttr.media.types.Gist') | |
.url('http://gist.github.com') | |
.matcher(/\b(?:https?\:\/\/)?gist\.github\.com\/(\S+)/g) | |
.icon('generic') | |
.process(function(slug, cb) { | |
slug = slug.replace(/\/$/, ''); | |
this.data["id"] = slug; | |
cb(); | |
}) | |
.methods({ | |
html: function(cb) { | |
var t = '<div class="gist"><iframe src="http://gist.github.com/{id}.pibb" /></div>' | |
cb(twttr.supplant(t, this.data)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment