Commit 7c2a3395 authored by d11e9's avatar d11e9

allow empty gist str

parent f1e372e8
...@@ -108,11 +108,15 @@ THE SOFTWARE. ...@@ -108,11 +108,15 @@ THE SOFTWARE.
var gistId; var gistId;
var key = location_hash_params[index+1]; var key = location_hash_params[index+1];
if (key === '') { if (key === '') {
gistId = getGistId( prompt("Enter the gist url or id you'd like to load.") ); var str = prompt("Enter the URL or ID of the Gist you'd like to load.")
if (str !== '') {
gistId = getGistId( str );
loadingFromGist = true;
}
} else { } else {
gistId = getGistId( key ); gistId = getGistId( key );
}
loadingFromGist = true; loadingFromGist = true;
}
$.ajax({ $.ajax({
url: 'https://api.github.com/gists/'+gistId, url: 'https://api.github.com/gists/'+gistId,
jsonp: 'callback', jsonp: 'callback',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment