mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-25 19:38:37 +08:00
actually remove the ajax code
This commit is contained in:
@@ -2,51 +2,6 @@
|
||||
title: Download
|
||||
permalink: /download
|
||||
---
|
||||
<style>
|
||||
.glyphicon.spinner {
|
||||
/*-webkit-animation: glyphicon-spin-r 1s infinite linear;*/
|
||||
animation: glyphicon-spin 1s infinite linear;
|
||||
}
|
||||
@keyframes glyphicon-spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
'url': 'https://api.github.com/repos/mRemoteNG/mRemoteNG/releases/latest',
|
||||
'dataType': 'json',
|
||||
'success': function(data, textStatus, jqXHR) {
|
||||
$('#loadingAlert').addClass('hidden');
|
||||
$('#latestRelease [data-version]').text(data.tag_name);
|
||||
$('#latestRelease [data-timestamp]').text(new Date(data.created_at).toDateString());
|
||||
$.grep(data.assets, function(element, index) {
|
||||
if (element.content_type == 'application/x-msdownload') {
|
||||
$('#latestRelease [data-msi]').attr('href', element.browser_download_url)
|
||||
.attr('data-original-title', (element.size / 1048576).toFixed(2) + ' MiB')
|
||||
.removeClass('hidden');
|
||||
}
|
||||
if (element.content_type == 'application/x-zip-compressed') {
|
||||
$('#latestRelease [data-zip]').attr('href', element.browser_download_url)
|
||||
.attr('data-original-title', (element.size / 1048576).toFixed(2) + ' MiB')
|
||||
.removeClass('hidden');
|
||||
}
|
||||
});
|
||||
}, 'error': function(jqXHR, textStatus, errorThrow) {
|
||||
$('#loadingAlert').addClass('hidden');
|
||||
console.error(errorThrow);
|
||||
}
|
||||
});
|
||||
$('[data-toggle="tooltip"]').tooltip({
|
||||
'container': 'body'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% for release in site.github.releases %}
|
||||
{% if release.draft == false and release.prerelease == false and stableRelease == nil %}
|
||||
{% assign stableRelease = release %}
|
||||
|
||||
Reference in New Issue
Block a user