This commit is contained in:
Chris 2015-01-20 00:44:04 -07:00
parent 03668551c2
commit 4901b11fae
1 changed files with 11 additions and 14 deletions

View File

@ -189,11 +189,10 @@ vAPI.tabs = {
vAPI.tabs.registerListeners = function() { vAPI.tabs.registerListeners = function() {
safari.application.addEventListener('beforeNavigate', function(e) { safari.application.addEventListener('beforeNavigate', function(e) {
if ( !e.target || e.url === 'about:blank' ) { if ( !vAPI.tabs.popupCandidate || !e.target || e.url === 'about:blank' ) {
return; return;
} }
var url = e.url, tabId = vAPI.tabs.getTabId(e.target); var url = e.url, tabId = vAPI.tabs.getTabId(e.target);
if ( vAPI.tabs.popupCandidate ) {
var details = { var details = {
url: url, url: url,
tabId: tabId, tabId: tabId,
@ -205,8 +204,6 @@ vAPI.tabs.registerListeners = function() {
if ( vAPI.tabs.stack[details.sourceTabId] ) { if ( vAPI.tabs.stack[details.sourceTabId] ) {
vAPI.tabs.stack[details.sourceTabId].activate(); vAPI.tabs.stack[details.sourceTabId].activate();
} }
return;
}
} }
}, true); }, true);