diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-07-30 13:53:43 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-07-30 13:53:43 +0200 |
commit | 44c35c7aadb4c7992c484053a6f4ddb4368bcb2e (patch) | |
tree | a71bd8616286833cb66f8bce3f288213b30b3bfd /public/static/js/collapse.js | |
parent | bb9a4dfbccd8563133bd36c4d98dd548aec52a47 (diff) |
Allow train detail page to be opened in a new tab via middle-click
The detail page is now accessible both via javascript (as before) and via an
<a> element wrapping the list entry.
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r-- | public/static/js/collapse.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js index 5ea412c..faca7ca 100644 --- a/public/static/js/collapse.js +++ b/public/static/js/collapse.js @@ -91,9 +91,10 @@ function dbf_show_moreinfo(trainElem, keep_old) { } function dbf_reg_handlers() { - $('div.app > ul > li').click(function() { + $('div.app > ul > li').click(function(event) { const trainElem = $(this); const station = $('div.app').data('station'); + event.preventDefault(); var suffix = ''; if (window.location.href.includes('detailed=1')) { suffix = '?detailed=1'; |