Просмотр исходного кода

Handle hash-bang urls used sometimes in v1

Alasdair Smith 8 лет назад
Родитель
Сommit
baf8b599d7
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/app/views/_scripts/active_tab.pug

+ 1 - 1
services/web/app/views/_scripts/active_tab.pug

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