|
|
@ -552,15 +552,7 @@ var run = function () { |
|
|
|
loadVersion($('#versionSelector').val()); |
|
|
|
loadVersion($('#versionSelector').val()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$.getJSON('https://ethereum.github.io/solc-bin/bin/list.json', function (data, status) { |
|
|
|
$.getJSON('https://ethereum.github.io/solc-bin/bin/list.json').done(function (data) { |
|
|
|
// loading failed for some reason, fall back to local compiler
|
|
|
|
|
|
|
|
if (status !== 'success') { |
|
|
|
|
|
|
|
$('#versionSelector').append(new Option('latest local version', 'builtin')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadVersion('builtin'); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function buildVersion (build) { |
|
|
|
function buildVersion (build) { |
|
|
|
if (build.prerelease && build.prerelease.length > 0) { |
|
|
|
if (build.prerelease && build.prerelease.length > 0) { |
|
|
|
return build.version + '-' + build.prerelease; |
|
|
|
return build.version + '-' + build.prerelease; |
|
|
@ -602,6 +594,11 @@ var run = function () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
loadVersion(selectedVersion); |
|
|
|
loadVersion(selectedVersion); |
|
|
|
|
|
|
|
}).fail(function (xhr, text, err) { |
|
|
|
|
|
|
|
// loading failed for some reason, fall back to local compiler
|
|
|
|
|
|
|
|
$('#versionSelector').append(new Option('latest local version', 'builtin')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadVersion('builtin'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
storage.sync(); |
|
|
|
storage.sync(); |
|
|
|