maps
This commit is contained in:
parent
33d02a4845
commit
20c0224bc8
53 changed files with 1329 additions and 60 deletions
|
|
@ -4,7 +4,12 @@ const ios = ua.indexOf("ios") > -1;
|
|||
const windows = ua.indexOf("windows") > -1;
|
||||
const linux = ua.indexOf("linux") > -1;
|
||||
const mac = ua.indexOf("macos") > -1;
|
||||
var hashlink = document.querySelector(".geo a");
|
||||
if ( windows || mac || linux ) hashlink.href = "https://maps.google.com/?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( android ) hashlink.href = "geo:0,0?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( ios ) hashlink.href = "http://maps.apple.com/?ll=" + hashlink.getAttribute("latlon") + "&q=" + hashlink.innerHTML;
|
||||
var hashlinks = document.querySelectorAll(".geo a");
|
||||
var hasharray = [...hashlinks];
|
||||
if ( hasharray.length > 0 ) {
|
||||
hasharray.forEach(hashlink => {
|
||||
if ( windows || mac || linux ) hashlink.href = "https://maps.google.com/?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( android ) hashlink.href = "geo:0,0?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( ios ) hashlink.href = "http://maps.apple.com/?ll=" + hashlink.getAttribute("latlon") + "&q=" + hashlink.innerHTML;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue