From 1eea9a4798620620e54411a061c483d226bbab1c Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 10 Apr 2019 22:18:36 +0000
Subject: [PATCH] When changing language file, keep the version tag
---
common.js | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/common.js b/common.js
index 11b7528..6733d46 100644
--- a/common.js
+++ b/common.js
@@ -1,3 +1,13 @@
+"use strict";
+
+var ttss_urls = {
+ t: 'proxy_tram.php',
+ // t: 'http://www.ttss.krakow.pl/internetservice',
+ b: 'proxy_bus.php',
+ // b: 'http://91.223.13.70/internetservice',
+};
+var ttss_types = ['t', 'b'];
+
// Special directions
var special_directions = {
'Zajezdnia Nowa Huta' : 'ZH',
@@ -107,10 +117,18 @@
});
}
-function tramIdToVehicleId(tramId) {
- for(var prop in vehicles_info) {
- if(vehicles_info[prop]['num'].substr(2) == tramId) {
- return prop;
+function depotIdToVehicleId(depotId, typeHelper) {
+ if(typeHelper) {
+ for(var prop in vehicles_info) {
+ if(prop.substr(0,1) == typeHelper && vehicles_info[prop]['num'].substr(2) == depotId) {
+ return prop;
+ }
+ }
+ } else {
+ for(var prop in vehicles_info) {
+ if(vehicles_info[prop]['num'] == depotId) {
+ return prop;
+ }
}
}
}
--
Gitblit v1.9.1