Set button to take you to claim url if the feeder is not claimed

This commit is contained in:
eric1tran 2020-12-11 16:56:48 +00:00
parent a0dc843842
commit ea5a2b8740
1 changed files with 5 additions and 2 deletions

View File

@ -2246,9 +2246,12 @@ function flightFeederCheck() {
function setStatsLink() {
$.ajax('/status.json', {
success: function(data) {
if (data.site_url) {
if (data.unclaimed_feeder_id) {
var claim_link = "https://flightaware.com/adsb/piaware/claim/" + data.unclaimed_feeder_id;
$('#stats_page_button').text("Claim this feeder on FlightAware")
myAdsbStatsSiteUrl = claim_link;
} else if (data.site_url) {
myAdsbStatsSiteUrl = data.site_url;
console.log(myAdsbStatsSiteUrl)
}
}
})