From e9ed2606958feaa4238f2f1915f043d11e1e2e84 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Fri, 30 Jul 2021 14:20:41 +0000
Subject: [PATCH] [map] Update old stop hashes to new format

---
 map.js   |    4 +++-
 map.html |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/map.html b/map.html
index 6afe729..1d19505 100644
--- a/map.html
+++ b/map.html
@@ -22,6 +22,6 @@
 <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.6.1/build/ol.js" integrity="sha384-2t8P2Mt0pPrLNwMqTljtykP6hpy7mzd34amfOqUYKK74XwsZgukowi3L4lW4bd3K" crossorigin="anonymous"></script>
 <script tyle="text/javascript" src="lang_pl.js?v10" id="lang_script"></script>
 <script tyle="text/javascript" src="common.js?v11"></script>
-<script tyle="text/javascript" src="map.js?v25"></script>
+<script tyle="text/javascript" src="map.js?v27"></script>
 </body>
 </html>
diff --git a/map.js b/map.js
index bef6783..a74adfa 100644
--- a/map.js
+++ b/map.js
@@ -944,7 +944,9 @@
 		return false;
 	},
 	_updateOld: function() {
-		if(window.location.hash.match(/^#![bt][0-9]{3}$/)) {
+		if(window.location.hash.match(/^#!sb[0-9]{1,3}$/)) {
+			this.go('sb' + window.location.hash.substr(4).padStart(4, '0'));
+		} else if(window.location.hash.match(/^#![bt][0-9]{3}$/)) {
 			this.go('v' + window.location.hash.substr(2));
 		} else if(window.location.hash.match(/^#![RHrh][A-Za-z][0-9]{3}$/)) {
 			this.go('vt'+ window.location.hash.substr(4));

--
Gitblit v1.9.1