Commit 31c01f19 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Reorder the version selector code for clarity

parent fa40becc
...@@ -506,9 +506,15 @@ var run = function () { ...@@ -506,9 +506,15 @@ var run = function () {
// ----------------- version selector------------- // ----------------- version selector-------------
// var soljsonSources is provided by bin/list.js // clear the version selector
$('option', '#versionSelector').remove(); $('option', '#versionSelector').remove();
// load the new version upon change
$('#versionSelector').change(function () {
loadVersion($('#versionSelector').val());
});
// var soljsonSources is provided by bin/list.js
if (window.soljsonSources !== undefined) { if (window.soljsonSources !== undefined) {
$.each(soljsonSources, function (i, file) { $.each(soljsonSources, function (i, file) {
if (file) { if (file) {
...@@ -521,10 +527,6 @@ var run = function () { ...@@ -521,10 +527,6 @@ var run = function () {
// always include the local version // always include the local version
$('#versionSelector').append(new Option('latest local version', 'soljson.js')); $('#versionSelector').append(new Option('latest local version', 'soljson.js'));
$('#versionSelector').change(function () {
loadVersion($('#versionSelector').val());
});
storage.sync(); storage.sync();
}; };
......
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