- Joined
- Nov 11, 2018
- Messages
- 123
- Reactions
- 103
- Age
- 28
I had a few hundred flights logged in AirData and wanted to collect each KML, CSV, and original .TXT log for several reasons.
So I wanted to share this dumb function to download all of your flights without having to open each one.
I tested this in Firefox.
Log into AirData, press F12 to open the JavaScript console, and paste the following code.
If you want the script to automatically delete the downloaded flights in order to reach the archived ones, change the first line to
...and press Enter. Go do something else while Firefox takes a dump on your CPU.

IMPORTANT: you will get a million download windows you'll have to click OK on unless you do the following:
- open your Firefox settings and click the General tab
- scroll down until you see the "Files and Applications" section
- make sure a download location is set, and the KML/CSV/TXT file extensions are set to "Save File"
My 800+ flight records are now safe and sound...
Enjoy!
So I wanted to share this dumb function to download all of your flights without having to open each one.
I tested this in Firefox.
Log into AirData, press F12 to open the JavaScript console, and paste the following code.
If you want the script to automatically delete the downloaded flights in order to reach the archived ones, change the first line to
var deleteOld = true;
Code:
var deleteOld = false;
var myMap = flightNavigation.findAllRowsByKeyAndValue().slice(1);
function downloadFlight(i){
if(i >= myMap.length){
if(deleteOld){
selectAllFilesInPage();
new BulkOperation("bulk_delete", selectedFlights).callBulkOperation({action: "bulk_delete"});
}
return;
}
var logHash = myMap[i].data().h;
new Promise(function(res, rej){
setTimeout(function(){
window.open("https://app.airdata.com/csv?flight=".concat(logHash));
res();
}, 300);
}).then(function (){
new Promise(function(res, rej){
setTimeout(function(){
window.open("https://app.airdata.com/kml?flight=".concat(logHash));
res();
}, 300);
}).then(function (){
new Promise(function(res, rej){
setTimeout(function(){
window.open("https://app.airdata.com/original?flight=".concat(logHash));
res();
}, 300);
}).then(function (){
if(i==28 && deleteOld){
selectAllFilesInPage();
new BulkOperation("bulk_delete", selectedFlights).callBulkOperation({action: "bulk_delete"});
myMap = myMap.slice(29);
downloadFlight(0);
}
else if(i<99) downloadFlight(i+1);
})
})
});
}
downloadFlight(0);
}
...and press Enter. Go do something else while Firefox takes a dump on your CPU.

IMPORTANT: you will get a million download windows you'll have to click OK on unless you do the following:
- open your Firefox settings and click the General tab
- scroll down until you see the "Files and Applications" section
- make sure a download location is set, and the KML/CSV/TXT file extensions are set to "Save File"
My 800+ flight records are now safe and sound...

Enjoy!
Last edited: