OLD | NEW |
(Empty) | |
| 1 $(document).ready(function() { |
| 2 var displayIntegrationVersion = function() { |
| 3 fetchEditorVersion('integration'); |
| 4 }; |
| 5 |
| 6 var updatePlaceholders = function(channel, version) { |
| 7 $('.editor-build-rev-' + channel).each(function(index, elem) { |
| 8 elem.innerHTML = version; |
| 9 }); |
| 10 }; |
| 11 |
| 12 var fetchEditorVersion = function(buildType) { |
| 13 $.ajax({ |
| 14 type: "GET", |
| 15 url: 'http://dart-editor-archive-' + buildType + '.commondatastorage.googl
eapis.com/latest/VERSION', |
| 16 dataType: "json", |
| 17 success: function(data) { |
| 18 updatePlaceholders(buildType, data['revision']); |
| 19 }, |
| 20 error: function(xhr, textStatus, errorThrown) { |
| 21 console.log(textStatus); |
| 22 } |
| 23 }) |
| 24 }; |
| 25 |
| 26 displayIntegrationVersion(); |
| 27 }); |
OLD | NEW |