Created
June 30, 2011 23:27
-
-
Save corbanb/1057543 to your computer and use it in GitHub Desktop.
gist2jsbin bookmarklet
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
//Created by: Corban Baxter | |
// Twitter: @corbanb | |
//Usage: coverts gist.github.com/ID to jsbin.com/gist/ID to easily run an HTMl/JS gist in browser | |
javascript:(function(){ | |
var idPath = location.pathname; | |
var host = location.host; | |
var gistHostname = "gist.github.com"; | |
var jsbinurl = "http://jsbin.com/gist"; | |
if(host != gistHostname){ | |
alert("You are not on '" + gistHostname + "'!"); | |
}else{ | |
document.location = jsbinurl + idPath; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment