Fixed server port being open after quit and date being 1970 if missing
Date wil be hidden if no set, and of GEO data is also missing "Not available" will be shown under "Photo info"
This commit is contained in:
@@ -181,14 +181,20 @@
|
||||
day: 'numeric'
|
||||
});
|
||||
if (typeof data.geo_data == 'undefined' || data.geo_data == null) {
|
||||
document.getElementById('photo-GeoData').textContent = ""
|
||||
document.getElementById('photo-GeoData').textContent = ""
|
||||
}else if(typeof data.geo_data.GeoData.features[0].properties.name !== 'undefined' & data.geo_data.GeoData.features[0].properties.name !== null & data.geo_data.GeoData.features[0].properties.name !== 'undefined' ){
|
||||
document.getElementById('photo-GeoData').textContent = data.geo_data.GeoData.features[0].properties.name + " - " + data.geo_data.GeoData.features[0].properties.city+ ", " + data.geo_data.GeoData.features[0].properties.country;
|
||||
}else{
|
||||
document.getElementById('photo-GeoData').textContent = data.geo_data.GeoData.features[0].properties.city+ ", " + data.geo_data.GeoData.features[0].properties.country;
|
||||
document.getElementById('photo-GeoData').textContent = data.geo_data.GeoData.features[0].properties.city+ ", " + data.geo_data.GeoData.features[0].properties.country;
|
||||
}
|
||||
|
||||
document.getElementById('photo-Date').textContent = formatted;
|
||||
if((typeof data.capture_date == 'undefined' || data.capture_date == null) && (typeof data.geo_data == 'undefined' || data.geo_data == null)){
|
||||
document.getElementById('photo-Date').textContent = "Not available"
|
||||
}else if (typeof data.capture_date == 'undefined' || data.capture_date == null) {
|
||||
document.getElementById('photo-Date').textContent = ""
|
||||
}else{
|
||||
document.getElementById('photo-Date').textContent = formatted;
|
||||
}
|
||||
}
|
||||
|
||||
// --- Clock ---
|
||||
|
||||
Reference in New Issue
Block a user