|
|
|
@ -330,12 +330,18 @@ var run = function () { |
|
|
|
|
// 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)); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
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 () { |
|
|
|
|
queryParams.update({ version: $('#versionSelector').val() }); |
|
|
|
|
loadVersion($('#versionSelector').val()); |
|
|
|
@ -452,7 +458,11 @@ var run = function () { |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
loadVersion(queryParams.get().version || 'soljson-latest.js'); |
|
|
|
|
if (window.soljsonSources !== undefined) { |
|
|
|
|
loadVersion(queryParams.get().version || 'soljson-latest.js'); |
|
|
|
|
} else { |
|
|
|
|
loadVersion('soljson.js'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
document.querySelector('#optimize').addEventListener('change', function () { |
|
|
|
|
queryParams.update({ optimize: document.querySelector('#optimize').checked }); |
|
|
|
|