<p>Just checking up on this PR, I notice that Travis is raising a Javascript issue which is caused by my "tidy" decision to refactor the context-menu callbacks into a separate file:</p>
<pre><code>% bundle exec rake jshint
app/assets/javascripts/index.js: line 90, col 32, 'context_directionsfrom' is not defined.
app/assets/javascripts/index.js: line 93, col 32, 'context_directionsto' is not defined.
app/assets/javascripts/index.js: line 96, col 32, 'context_addnote' is not defined.
app/assets/javascripts/index.js: line 99, col 32, 'context_describe' is not defined.
app/assets/javascripts/index.js: line 102, col 32, 'context_queryhere' is not defined.
app/assets/javascripts/index.js: line 105, col 32, 'context_centrehere' is not defined.
app/assets/javascripts/index/contextmenu.js: line 1, col 7, 'context_describe' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 9, col 7, 'context_directionsfrom' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 19, col 7, 'context_directionsto' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 29, col 7, 'context_addnote' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 39, col 7, 'context_centrehere' is defined but never used.
app/assets/javascripts/index/contextmenu.js: line 43, col 7, 'context_queryhere' is defined but never used.
</code></pre>
<p>If anyone has any advice about the organisation of that bit of code, I'd be grateful. I could drop the refactor (omit commit <a href="https://github.com/openstreetmap/openstreetmap-website/commit/35fbcf28154b6f15f697018016fbabc952e018a5" class="commit-link"><tt>35fbcf2</tt></a>).<br>
(IIUC the contextmenu needs to be added during the <code>new L.OSM.Map()</code> call rather than afterwards, which is what limited my refactoring choices.)</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1030#issuecomment-147519403">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLTEgpGlguA0dx9qYuXp9xNhnSlqGks5o7BZVgaJpZM4FoQbk.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1030#issuecomment-147519403"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>