Do not use AJAX for retrieving the list of binaries.

pull/1/head
chriseth 9 years ago
parent 1581a4c74e
commit 3f881d9dbe
  1. 30
      index.html

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

Loading…
Cancel
Save