Commit 3bd46038 authored by chriseth's avatar chriseth

Merge pull request #45 from ethereum/fixImport

Fixed import from github.
parents 682f8af6 398f3fea
......@@ -403,8 +403,8 @@ var run = function() {
// ----------------- compiler ----------------------
function handleGithubCall(root, path, cb) {
$('#output').append($('<div/>').append($('<pre/>').text("Loading github.com/" + root + " ...")));
return $.getJSON('https://api.github.com/repos/' + root + '/contents/' + path, cb);
$('#output').append($('<div/>').append($('<pre/>').text("Loading github.com/" + root + "/" + path + " ...")));
return $.getJSON('https://api.github.com/repos/' + root + '/contents/' + path, cb);
}
var compiler = new Compiler(web3, editor, handleGithubCall, $('#output'), getHidingRHP, updateFiles);
......
......@@ -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