<p dir="auto">Presumably this was an oversight in the original implementation: <code class="notranslate">OSM.params</code> falls back to the page's <code class="notranslate">query</code> string if the function's parameter (here: the page's <code class="notranslate">hash</code>) is an empty string.</p>
<p dir="auto">This fixes some inconsistent behaviour of the website. In the example below, the first URL sets the <code class="notranslate">background</code> to <code class="notranslate">none</code> while in the second example it doesn't.</p>
<ul dir="auto">
<li><a href="https://www.openstreetmap.org/edit.html?background=none" rel="nofollow">https://www.openstreetmap.org/edit.html?background=none</a></li>
<li><a href="https://www.openstreetmap.org/edit.html?background=none#map=%E2%80%A6" rel="nofollow">https://www.openstreetmap.org/edit.html?background=none#map=…</a></li>
</ul>
<p dir="auto">With this PR, the <code class="notranslate">background</code> query parameter is ignored in both examples. The correct way to supply the <code class="notranslate">background</code> (and <a href="https://github.com/openstreetmap/openstreetmap-website/blob/c55d346/app/assets/javascripts/edit/id.js.erb#L23-L39">related parameters</a>) is via a hash parameter:</p>
<ul dir="auto">
<li><a href="https://www.openstreetmap.org/edit.html#background=none" rel="nofollow">https://www.openstreetmap.org/edit.html#background=none</a></li>
<li><a href="https://www.openstreetmap.org/edit.html#background=none&map=%E2%80%A6" rel="nofollow">https://www.openstreetmap.org/edit.html#background=none&map=…</a></li>
</ul>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3571'>https://github.com/openstreetmap/openstreetmap-website/pull/3571</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3571/commits/66656e1d1d58e6073efd453007d7452920531b37" class="commit-link">66656e1</a> only parse hashParams if there is a hash</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3571/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3571/files#diff-5c2b51e0ba5f2385195ba895842df7b083fc07b716e39a720f01d5a988edeefa">app/assets/javascripts/edit/id.js.erb</a>
(3)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3571.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3571.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3571.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3571.diff</a></li>
</ul>
<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/pull/3571">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI2CZD5K3GCYSWMYS3VPDHODANCNFSM5YYWOETA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLISP2FX6YVDYCZWHR3VPDHODA5CNFSM5YYWOETKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4S6FLVOA.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/pull/3571</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/pull/3571",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3571",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>