summaryrefslogtreecommitdiff
path: root/public/static/js/geolocation.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/static/js/geolocation.js')
-rw-r--r--public/static/js/geolocation.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index 9cde56d..ccc8c3a 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -56,9 +56,11 @@ $(document).ready(function() {
}
};
- if (navigator.geolocation) {
- navigator.geolocation.getCurrentPosition(processLocation, processError);
- } else {
- showError('Standortanfragen werden von diesem Browser nicht unterstützt', '', null);
+ if ($('div.geolocation').length) {
+ if (navigator.geolocation) {
+ navigator.geolocation.getCurrentPosition(processLocation, processError);
+ } else {
+ showError('Standortanfragen werden von diesem Browser nicht unterstützt', '', null);
+ }
}
});