Merge pull request #17 from chriseth/includeList

Do not use AJAX for retrieving the list of binaries.
pull/1/head
chriseth 9 years ago
commit a2bd811a84
  1. 30
      index.html

@ -35,6 +35,7 @@ THE SOFTWARE.
<style type="text/css">
</style>
<script src="bin/list.js"></script>
<script src="libs/jquery-2.1.3.min.js"></script>
<script src="libs/ace.js"></script>
<script src="libs/mode-solidity.js"></script>
@ -94,23 +95,22 @@ THE SOFTWARE.
// ----------------- version selector-------------
$.get('bin/list.txt').then(function(versionList) {
$('option', '#versionSelector').remove();
$.each(versionList.split('\n'), function(i, file) {
if (file) {
// var soljsonSources is provided by bin/list.js
$('option', '#versionSelector').remove();
$.each(soljsonSources, function(i, file) {
if (file) {
var version = file.replace(/soljson-(.*).js/, "$1");
$('#versionSelector').append(new Option(version, file));
}
});
$('#versionSelector').change(function() {
Module = null;
compileJSON = null;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'bin/' + $('#versionSelector').val();
$('head').append(script);
onCompilerLoaded();
});
}
});
$('#versionSelector').change(function() {
Module = null;
compileJSON = null;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'bin/' + $('#versionSelector').val();
$('head').append(script);
onCompilerLoaded();
});
// ----------------- resizeable ui ---------------

Loading…
Cancel
Save