diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 1a2ac57..5c316f8 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -141,16 +141,20 @@ vAPI.tabs.registerListeners = function() { }; var onBeforeNavigate = function(details) { - //console.debug('onBeforeNavigate: popup candidate', details.tabId); - popupCandidateTest(details); + if ( details.frameId === 0 ) { + //console.debug('onBeforeNavigate: popup candidate', details.tabId); + popupCandidateTest(details); + } }; var onCommitted = function(details) { - //console.debug('onCommitted: popup candidate', details.tabId); - if ( popupCandidateTest(details) === true ) { - return; + if ( details.frameId === 0 ) { + //console.debug('onCommitted: popup candidate', details.tabId); + if ( popupCandidateTest(details) === true ) { + return; + } + popupCandidateDestroy(details); } - popupCandidateDestroy(details); onNavigationClient(details); };