aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js11
-rw-r--r--web/cobrands/sass/_base.scss3
2 files changed, 6 insertions, 8 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 4c159e5c3..7c7b3a9d0 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -409,20 +409,15 @@ $.extend(fixmystreet.set_up, {
},
report_geolocation: function() {
- if ('geolocation' in navigator && $('.js-geolocate').length) {
- var link = $('.js-geolocate').attr('action');
- link = '<a href="' + link + '" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
- if ($('body.frontpage').length) {
- $('.js-geolocate').after(link);
- } else{
- $('.js-geolocate').append(link);
- }
+ if ('geolocation' in navigator) {
fixmystreet.geolocate.setup(function(pos) {
var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude;
var page = $('#geolocate_link').attr('href');
location.href = page + '?latitude=' + latitude + ';longitude=' + longitude;
});
+ } else {
+ $('#geolocate_link').hide();
}
},
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index b9f71257b..dbae6e6a6 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -1958,6 +1958,9 @@ label .muted {
}
}
}
+.no-js #geolocate_link {
+ display: none !important;
+}
#front-howto {
#front_stats {