Skip to content

Commit

Permalink
revert fix for gorhill#1028: can't be fixed without bad side effects
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Feb 27, 2016
1 parent 0777602 commit 02014f9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/js/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ vAPI.tabs.onPopupUpdated = (function() {
// Log only for when there was a hit against an actual filter (allow or block).
if ( µb.logger.isEnabled() ) {
µb.logger.writeOne(
openerTabId,
popupType === 'popup' ? openerTabId : targetTabId,
'net',
result,
popupType,
Expand Down Expand Up @@ -725,11 +725,12 @@ vAPI.tabs.onPopupUpdated = (function() {
}

// It is a popup, block and remove the tab.
µb.unbindTabFromPageStats(targetTabId);

vAPI.tabs.remove(targetTabId, true);
if ( popupType === 'popunder' ) {
vAPI.tabs.replace(openerTabId, targetURL);
if ( popupType === 'popup' ) {
µb.unbindTabFromPageStats(targetTabId);
vAPI.tabs.remove(targetTabId, true);
} else {
µb.unbindTabFromPageStats(openerTabId);
vAPI.tabs.remove(openerTabId, true);
}

return true;
Expand Down

0 comments on commit 02014f9

Please sign in to comment.