From 7516f316cc75ade9ece7aaa6c61f2991ece46b32 Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 26 Nov 2018 10:33:55 +0300 Subject: [PATCH 1/3] Geolocation added --- index.html | 4 ++++ js/app.js | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 js/app.js diff --git a/index.html b/index.html index 7f9586e5..71d56440 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,9 @@

Оставайтесь на связи

Оставьте ваши контакты и мы свяжемся с вами сегодня!

+
@@ -86,5 +89,6 @@

Оставайтесь на связи

+ \ No newline at end of file diff --git a/js/app.js b/js/app.js new file mode 100644 index 00000000..f7336fee --- /dev/null +++ b/js/app.js @@ -0,0 +1,9 @@ +(async () => { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(position => { + const coordsEl = document.querySelector('#user-coords'); + coordsEl.textContent = `${position.coords.latitude}, ${position.coords.longitude}` + coordsEl.parentElement.classList.remove('invisible'); + }); + } +})(); \ No newline at end of file From 016cd5dc2277d800544e17cbb31bc3c2a064468d Mon Sep 17 00:00:00 2001 From: Oleg Date: Thu, 25 Aug 2022 19:46:38 +0300 Subject: [PATCH 2/3] chahnges --- .DS_Store | Bin 0 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c7d51a90750c8d9f217162789317b9bd59738097 GIT binary patch literal 6148 zcmeH~v1-FW42FNT9s*rFcDyBPA#ZSmOw5=M_`(Ti+>f`z<@gz@)<8p?Fp8zI)6o1mgxLET Hyi|c-gQgO9 literal 0 HcmV?d00001 From 3e6c93f63dc22c9c3e0d7b56fb653424d344cdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=A1=D0=B8=D0=BD?= =?UTF-8?q?=D1=91=D0=B2?= Date: Wed, 31 Aug 2022 14:31:34 +0300 Subject: [PATCH 3/3] debug --- js/app.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/app.js b/js/app.js index ab69adbf..f7336fee 100644 --- a/js/app.js +++ b/js/app.js @@ -1,5 +1,4 @@ (async () => { -HEAD if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(position => { const coordsEl = document.querySelector('#user-coords'); @@ -7,5 +6,4 @@ HEAD coordsEl.parentElement.classList.remove('invisible'); }); } - // TODO: add custom logic here })(); \ No newline at end of file