init
This commit is contained in:
parent
ca8e39e641
commit
3b75097fed
45 changed files with 3567 additions and 0 deletions
10
web/nfc-theme/static/geo.js
Normal file
10
web/nfc-theme/static/geo.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const ua = String(platform.os).toLowerCase();
|
||||
const android = ua.indexOf("android") > -1;
|
||||
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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue