Skip to content

Commit

Permalink
test something
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Jan 24, 2021
1 parent f02cb5c commit c86386c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,14 @@ function fetchData(options) {

let suffix = binCraft ? '.binCraft' : '.json'
let mid = (binCraft && onlyMilitary) ? 'Mil_' : '_';
for (let i in indexes) {
ac_url.push('data/globe' + mid + indexes[i].toString().padStart(4, '0') + suffix);
if (adsbexchange) {
for (let i in indexes) {
ac_url.push('https://globe-data.adsbexchange.com/data/globe' + mid + indexes[i].toString().padStart(4, '0') + suffix);
}
} else {
for (let i in indexes) {
ac_url.push('data/globe' + mid + indexes[i].toString().padStart(4, '0') + suffix);
}
}
}
} else {
Expand All @@ -358,6 +364,9 @@ function fetchData(options) {
url: ac_url[i], method: 'GET',
xhr: function() { return xhrOverride; },
timeout: 5000,
beforeSend: function(xhr) {
xhr.setRequestHeader('__cfduid', '1234');
},
});
} else {
req = $.ajax({ url: ac_url[i], dataType: 'json' });
Expand Down

0 comments on commit c86386c

Please sign in to comment.