Skip to content

Commit

Permalink
feat: auto-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Feb 11, 2020
1 parent 28bdfed commit ed22ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ <h1 class="jumbotron-heading">Yolo World!</h1>
</script>

<script type="text/javascript">
var t;
function fetch() {
clearTimeout(t);
var url = "/api/build-list?";
var kind = $('#kind option:selected').attr('id');
if (kind !== undefined && kind != "") {
Expand All @@ -107,6 +109,7 @@ <h1 class="jumbotron-heading">Yolo World!</h1>
var template = $('#releasesTpl').html();
var html = Mustache.to_html(template, data);
$('#releases').html(html);
t = setTimeout(fetch, 10*1000);
}
});
}
Expand Down

0 comments on commit ed22ef8

Please sign in to comment.