1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-23 19:03:02 +01:00

#1051: test only root frames

This commit is contained in:
gorhill 2015-03-20 23:37:43 -04:00
parent 849206ebe7
commit 04a5786c41

View File

@ -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);
};