diff --git a/module/index/js/index.js b/module/index/js/index.js index 8bb947caaf..9a226aa900 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -139,7 +139,7 @@ for(var group in openedTabs) { var tab = openedTabs[group]; - if((!onlyShowed || tab.show) && lastShowIndex < tab.zIndex) + if((!onlyShowed || tab.show) && lastShowIndex < tab.zIndex && !tab.closed) { lastShowIndex = tab.zIndex; lastTab = tab; @@ -198,6 +198,7 @@ var tab = openedTabs[group]; if(!tab) return; + tab.closed = true; hideTab(group); tab.$page.remove(); tab.$bar.remove(); @@ -298,19 +299,10 @@ /* Redirect or open default tab after document load */ var defaultOpenUrl = window.defaultOpen; - if(!defaultOpenUrl) + if(!defaultOpenUrl && location.hash.indexOf('#open=') === 0) { - if(location.hash.indexOf('#open=') === 0) - { - defaultOpenUrl = decodeURIComponent(location.hash.substr(6)); - } - if(!defaultOpenUrl) - { - defaultOpenUrl = $.cookie('open-in-tab'); - if(defaultOpenUrl) $.cookie('open-in-tab', null); - } + defaultOpenUrl = decodeURIComponent(location.hash.substr(6)); } - if(defaultOpenUrl) openTab(defaultOpenUrl); else openTab(defaultTabGroup); });