mapserver/static/js/compat.js

16 lines
428 B
JavaScript
Raw Normal View History

2019-08-30 11:59:55 +03:00
export function hashCompat(){
if (window.location.hash) {
let match = window.location.hash.match(/^#\/(\d*)\/(\d*)\/(\d*)$/m);
if (match) {
2019-09-01 13:06:47 +03:00
window.location.hash = `#!/map/0/${match[1]}/${match[2]}/${match[3]}`;
2019-08-30 11:59:55 +03:00
}
match = window.location.hash.match(/^#\/(\d*)\/(\d*)\/(\d*)\/(\d*)$/m);
if (match) {
2019-09-01 13:06:47 +03:00
window.location.hash = `#!/map/${match[1]}/${match[2]}/${match[3]}/${match[4]}`;
2019-08-30 11:59:55 +03:00
}
}
}