AdguardTeam / AdguardBrowserExtension

AdGuard browser extension
https://adguard.com/
GNU General Public License v3.0
3.03k stars 325 forks source link

Popup #435

Closed Anoop2609 closed 6 years ago

Anoop2609 commented 7 years ago

Add feature of popup blocking because some torrent site and other has to much popup

Alex-302 commented 7 years ago

Please write here with the site examples https://github.com/AdguardTeam/AdguardFilters/issues

worldsdream commented 7 years ago

I think he means a feature, where you can add websites to it manually and those websites wont open any popups anymore.

ameshkov commented 7 years ago

I think he means a feature, where you can add websites to it manually and those websites wont open any popups anymore.

Ah, I got the idea.

@Anoop2609 I need as more examples of such websites as possible.

Anoop2609 commented 7 years ago

https://thehiddenbay.xyz/ ,https://extratorrent.stream/ ,https://eztv.unblocked.rocks/ , https://limetorrents.unblocked.video/ ,https://torrentbutler.bypassed.live/ and other torrent. I am using firefox 50 so i only see popup in firefox , not any other browser.

ameshkov commented 7 years ago

@seanl-adg could you please take a look at these sites? I see they all use the same approach - clicking torrent link for the first time causes a popup.

I am interested in the script they use. Also I'd like to know if you have any ideas on what can be done to suppress this script?

worldsdream commented 7 years ago

@ameshkov is it possible to have a feature in adguard products.

1) If we add a website in userfilter with something behind it for example: website.com^nopopup and it will block all the popups of that website? 2) A setting where we add those websites and it kill the popups?

Or not possible? I heard ublock is doing this correct?

ameshkov commented 7 years ago

If we add a website in userfilter with something behind it for example: website.com^nopopup and it will block all the popups of that website?

That's exactly what I am thinking about.

Anoop2609 commented 7 years ago

@ameshkov it is not good way to block popup by adding every single website in userfilter because all torrent site have there proxy site and they all have same behavior, so we need to dig into the script. visit https://proxyportal.org/ there are all torrent site which have same problem. I am thinking it may be helpful for use to see the problem.

You can develop any filter for popup in which add all the website which is present in https://proxyportal.org/ for now and keep updating until better solution come.

theseanl commented 7 years ago

Here is a deobfuscated popup script used in https://thehiddenbay.xyz/.

Note:

Anoop2609 commented 7 years ago

Man, you are awesome. Will you fix this issue in next beta release or in filter.

ameshkov commented 7 years ago

@seanl-adg so they emulate link click. Pretty popular approach, we should take care of it as well.

So, here are all the approaches we'd better take care of:

  1. window.open - we can simply override it
  2. Dynamic link creation and clicking using MouseEvent.initMouseEvent - override MouseEvent.prototype.initMouseEvent and that's it.
ameshkov commented 6 years ago

https://github.com/AdguardTeam/PopupBlocker