<p></p>
<p dir="auto">We have an amount of html building being created using JavaScript code. For example, in <code class="notranslate">leaflet.share.js</code> there is a substantial amount of html construction:</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/blob/7cf9bf0e553a141acab2afea53842f97eddd0a40/app/assets/javascripts/leaflet.share.js#L37-L53">https://github.com/openstreetmap/openstreetmap-website/blob/7cf9bf0e553a141acab2afea53842f97eddd0a40/app/assets/javascripts/leaflet.share.js#L37-L53</a></p>
<p dir="auto">This makes it harder to find, and much harder to maintain, than having the html in a view like the rest of the site. It's also mostly unnecessary, since html like this isn't dynamic, it's the same for every user.</p>
<p dir="auto">We should move all of this html into views, and use the javascript only for interactivity like changing content (e.g. taking results of an ajax query and putting them into the html) or to show/hide certain elements after UI interactions.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5616">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOYVHMYT3GNGKJ26UD2OJCQ7AVCNFSM6AAAAABWRTRYW6VHI2DSMVQWIX3LMV43ASLTON2WKOZSHAZTGNJUGEYTSMQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJ5FMCCDN5MFD3PXST2OJCQ7A5CNFSM6AAAAABWRTRYW6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKRZDIJA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5616</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/5616",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5616",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>