Commit 398f3fea authored by chriseth's avatar chriseth

Fixed import from github.

parent 054dec78
......@@ -403,7 +403,7 @@ var run = function() {
// ----------------- compiler ----------------------
function handleGithubCall(root, path, cb) {
$('#output').append($('<div/>').append($('<pre/>').text("Loading github.com/" + root + " ...")));
$('#output').append($('<div/>').append($('<pre/>').text("Loading github.com/" + root + "/" + path + " ...")));
return $.getJSON('https://api.github.com/repos/' + root + '/contents/' + path, cb);
}
......
......@@ -181,7 +181,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
files[m] = cachedRemoteFiles[m];
reloop = true;
} else if (githubMatch = /^(https?:\/\/)?(www.)?github.com\/([^\/]*\/[^\/]*)\/(.*)/.exec(m)) {
handleGithubCall(function(result) {
handleGithubCall(githubMatch[3], githubMatch[4], function(result) {
if ('content' in result)
{
var content = Base64.decode(result.content);
......
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