mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Add user geolocation and user statistical graphs
This commit is contained in:
parent
8c452f6638
commit
2c221e8216
62 changed files with 16308 additions and 58 deletions
|
@ -323,3 +323,16 @@ function getPagePlaySettings() {
|
|||
|
||||
return settings;
|
||||
}
|
||||
|
||||
function geolocate_user() {
|
||||
if(navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(geolocate_user_callback);
|
||||
} else {
|
||||
Console.error("This browser does not support geolocation");
|
||||
}
|
||||
}
|
||||
|
||||
function geolocate_user_callback(position) {
|
||||
var url = jsAjaxUrl + '?page=stats&action=geolocation&latitude=' + position.coords.latitude + '&longitude=' + position.coords.longitude;
|
||||
$.get(url);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue