<p dir="auto">That's what was happening before <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/d7b4f88d5e342b5c2b4f2435d0394e4286524678/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/d7b4f88d5e342b5c2b4f2435d0394e4286524678"><tt>d7b4f88</tt></a>, but after that the init code was moved inside <code class="notranslate">$(document).ready( ... )</code>. That means it may not run before other code wants to use it, like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2742729492" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5402" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5402/hovercard?comment_id=1923067165&comment_type=review_comment" href="https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1923067165">#5402 (comment)</a>. <code class="notranslate"><head></code> already exists by the time application.js runs, it should be possible to read html attributes from there.</p>
<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/5538'>https://github.com/openstreetmap/openstreetmap-website/pull/5538</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5538/commits/d81243d5f2e61c23f75bab637a2cf1599afb7100" class="commit-link">d81243d</a> Initialize I18n and OSM as soon as application.js loads</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5538/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5538/files#diff-0e145ba000e96b1a45d230275e350e4e8514efb4db7dbcfa228fe1003896c9b4">app/assets/javascripts/application.js</a>
(44)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5538.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5538.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5538.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5538.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/5538">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLK7VCVJJ3UZIEDBC6T2MB5AHAVCNFSM6AAAAABVWQCL7OVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYDKOJVG4ZTGOA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLP5D3LAEFG6LJ4IV5T2MB5AHA5CNFSM6AAAAABVWQCL7OWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKOP4C3I.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/5538</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/5538",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5538",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>