Move the version selector code after the compiler was initialised

pull/1/head
Alex Beregszaszi 8 years ago
parent aad0b894f0
commit fa40becc75
  1. 42
      src/app.js

@ -334,27 +334,6 @@ var run = function () {
updateFiles();
// ----------------- version selector-------------
// var soljsonSources is provided by bin/list.js
$('option', '#versionSelector').remove();
if (window.soljsonSources !== undefined) {
$.each(soljsonSources, function (i, file) {
if (file) {
var version = file.replace(/soljson-(.*).js/, '$1');
$('#versionSelector').append(new Option(version, file));
}
});
}
// always include the local version
$('#versionSelector').append(new Option('latest local version', 'soljson.js'));
$('#versionSelector').change(function () {
loadVersion($('#versionSelector').val());
});
// ----------------- resizeable ui ---------------
var dragging = false;
@ -525,6 +504,27 @@ var run = function () {
compiler.compile();
});
// ----------------- version selector-------------
// var soljsonSources is provided by bin/list.js
$('option', '#versionSelector').remove();
if (window.soljsonSources !== undefined) {
$.each(soljsonSources, function (i, file) {
if (file) {
var version = file.replace(/soljson-(.*).js/, '$1');
$('#versionSelector').append(new Option(version, file));
}
});
}
// always include the local version
$('#versionSelector').append(new Option('latest local version', 'soljson.js'));
$('#versionSelector').change(function () {
loadVersion($('#versionSelector').val());
});
storage.sync();
};

Loading…
Cancel
Save