Handle hash-bang urls used sometimes in v1

This commit is contained in:
Alasdair Smith 2018-09-24 10:59:49 +01:00 committed by Jessica Lawshe
parent 8e99142537
commit baf8b599d7

View file

@ -1,7 +1,7 @@
script(type="text/javascript"). script(type="text/javascript").
if (window.location.hash) { if (window.location.hash) {
setTimeout(function(){ setTimeout(function(){
tabID = window.location.hash.replace('#', '') tabID = window.location.hash.replace(/#!?/, '')
tab = document.getElementById(tabID) tab = document.getElementById(tabID)
if (tab && typeof(tab) != 'undefined' && tab != null) { if (tab && typeof(tab) != 'undefined' && tab != null) {
tab.setAttribute('active', true) tab.setAttribute('active', true)