AdguardTeam / PopupBlocker

Popup blocking userscript
GNU Lesser General Public License v3.0
337 stars 31 forks source link

A 'popup blocked' notification appears despite the new tab opens anyway #57

Closed vbagirov closed 6 years ago

vbagirov commented 6 years ago

Example: https://vk.com/comssru

Screenshot:

![image](https://uploads.adguard.com/vbagirovtngd6.png)

When you click on this link, you are taken to the comss.ru website (new tab), but there's also a notification about the blocked popup.

theseanl commented 6 years ago

Here is what is happening: the page https://vk.com/comssru intercepts click events, perform something that is very similar to those of popup/popunder scripts, performs various other logics including tracking outbound link clicks, and then "prevent default" actions of browsers.

Such logic is included in a file https://vk.com/js/al/common.js, in the body of onDocumentClick function.

Popup Blocker blocks the first part, so a notification is triggered, but at the same time the subsequent "prevent default" operation is blocked, so the link is navigated as it should.

I will add vk.com to default exclusions, as the page is already using complex logics which can be modified in future, and there is no guarantee that such logic will always be distinguishable from popup/popunder scripts.