X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/89a132d31c8ca3b446c716860e55bf31bc811bd0..4b2c64fbed7ed3420e10d1f1a7eaef26f0e4e025:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index 6701e0bbd..44d02c097 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -11,7 +11,7 @@ L.OSM.share = function (options) { .attr('class', 'control-share'); var button = $('') - .attr('class', 'control-button mobile-hide') + .attr('class', 'control-button') .attr('href', '#') .attr('title', I18n.t('javascripts.share.title')) .html('') @@ -230,6 +230,7 @@ L.OSM.share = function (options) { update(); options.sidebar.togglePane($ui, button); + $('.leaflet-control .control-button').tooltip('hide'); } function toggleMarker() { @@ -273,6 +274,19 @@ L.OSM.share = function (options) { update(); } + function escapeHTML(string) { + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + return string === null ? '' : (string + '').replace(/[&<>"']/g, function(match) { + return htmlEscapes[match]; + }); + } + function update() { var bounds = map.getBounds();