0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-14 08:58:29 +00:00
healthchecks_healthchecks/static/js/badges.js
2020-11-27 12:57:25 +02:00

37 lines
868 B
JavaScript

$(function() {
$(".fetch-json").each(function(idx, el) {
$.getJSON(el.dataset.url, function(data) {
el.innerText = JSON.stringify(data);
});
});
$("#show-svg").click(function() {
$("#badges-svg").show();
$("#badges-json").hide();
$("#badges-shields").hide();
})
$("#show-json").click(function() {
$("#badges-svg").hide();
$("#badges-json").show();
$("#badges-shields").hide();
})
$("#show-shields").click(function() {
$("#badges-svg").hide();
$("#badges-json").hide();
$("#badges-shields").show();
})
$("#show-with-late").click(function() {
$(".no-late").hide();
$(".with-late").show();
})
$("#show-no-late").click(function() {
$(".with-late").hide();
$(".no-late").show();
})
});