| Index: src/site/js/editor-version.js
|
| diff --git a/src/site/js/editor-version.js b/src/site/js/editor-version.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..328f79e3dfbe1ca39d80808f6aadb7913ab7472c
|
| --- /dev/null
|
| +++ b/src/site/js/editor-version.js
|
| @@ -0,0 +1,27 @@
|
| +$(document).ready(function() {
|
| + var displayIntegrationVersion = function() {
|
| + fetchEditorVersion('integration');
|
| + };
|
| +
|
| + var updatePlaceholders = function(channel, version) {
|
| + $('.editor-build-rev-' + channel).each(function(index, elem) {
|
| + elem.innerHTML = version;
|
| + });
|
| + };
|
| +
|
| + var fetchEditorVersion = function(buildType) {
|
| + $.ajax({
|
| + type: "GET",
|
| + url: 'http://dart-editor-archive-' + buildType + '.commondatastorage.googleapis.com/latest/VERSION',
|
| + dataType: "json",
|
| + success: function(data) {
|
| + updatePlaceholders(buildType, data['revision']);
|
| + },
|
| + error: function(xhr, textStatus, errorThrown) {
|
| + console.log(textStatus);
|
| + }
|
| + })
|
| + };
|
| +
|
| + displayIntegrationVersion();
|
| +});
|
|
|