瀏覽代碼

Handle hash-bang urls used sometimes in v1

Alasdair Smith 8 年之前
父節點
當前提交
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").
 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)