summaryrefslogtreecommitdiff
path: root/public/static/js/collapse.js
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-03 15:07:13 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-03 15:07:13 +0200
commit3184facb4b497bc44e5b5d54f0ce0fa5a4d88d3b (patch)
tree55a9e1fc951444351b8d80008b11312642a34794 /public/static/js/collapse.js
parentb7fa09f8139715c282ee49df764da2cfe53d4ced (diff)
do not treat hafas=0 as "HAFAS enabled"
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r--public/static/js/collapse.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js
index 2db1089..d7d1e3b 100644
--- a/public/static/js/collapse.js
+++ b/public/static/js/collapse.js
@@ -113,7 +113,7 @@ function dbf_reg_handlers() {
if (param.get('detailed')) {
suffix += '&detailed=1';
}
- if (param.get('hafas')) {
+ if (param.get('hafas') && param.get('hafas') != '0') {
suffix += '&hafas=' + param.get('hafas') + '&highlight=' + trainElem.data('station');
}
if (param.get('past')) {
@@ -122,7 +122,7 @@ function dbf_reg_handlers() {
if (param.get('rt') || param.get('show_realtime')) {
suffix += '&rt=1';
}
- if (param.get('hafas')) {
+ if (param.get('hafas') && param.get('hafas') != '0') {
history.pushState({'page':'traindetail','jid':trainElem.data('jid')}, 'test', '/z/' + trainElem.data('jid') + suffix);
} else {
history.pushState({'page':'traindetail','station':station,'train':trainElem.data('no')}, 'test', '/z/' + trainElem.data('train') + '/' + trainElem.data('station') + suffix);