Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uBlock Origin for Google Chrome and apiBreaker #2609

Closed
dimisa-RUAdList opened this issue May 14, 2017 · 5 comments
Closed

uBlock Origin for Google Chrome and apiBreaker #2609

dimisa-RUAdList opened this issue May 14, 2017 · 5 comments

Comments

@dimisa-RUAdList
Copy link

uBlock Origin 1.12.4
uBlock filters
EasyList
RU AdList
Google Chrome 58.0.3029.110 (64-bit)

http://www.segodnya.ua/culture/stars/emili-blant-i-tom-kruz-vernutsya-v-gran-budushchego-2-1020015.html

@gorhill
Copy link
Owner

gorhill commented May 14, 2017

Description of what is happening on that page.

The site uses a MutationObserver to detect changes to the style attribute of the ad-laden iframe tag, to restore the display: block !important; style. uBO does the same, except that is to restore the display: none !important; style. So both are fighting to have their style enforced, this causes constant mutation events to be fired, and both listeners to be constantly called as a result.

This is not an issue on Firefox because it supports user styles, there is no need for uBO to modify the style attributes of the iframe.

I did observe that I could improve uBO's mutation listener code by using a Set() instead of an Array to coalesce the nodes reported in mutation events. When using an array, uBO has to iterate through over a thousand entries, all for the same two nodes, while if using a Set(), there is only two entries to iterate though. However when using a Set(), the page's style wins -- the iframe ends up not being hidden, which means in the end the solution for the not-hidden iframe has to be something else.

@dimisa-RUAdList
Copy link
Author

gorhill added a commit to uBlockOrigin/uAssets that referenced this issue May 14, 2017
gorhill added a commit to uBlockOrigin/uAssets that referenced this issue May 14, 2017
gorhill added a commit to uBlockOrigin/uAssets that referenced this issue May 20, 2017
@evenfrost
Copy link

@gorhill Same thing started happening here recently, and that's incessant fight for display: none !important.

gorhill added a commit to uBlockOrigin/uAssets that referenced this issue Sep 4, 2017
@gorhill
Copy link
Owner

gorhill commented Sep 4, 2017

@evenfrost Fixed, filter added to "uBlock filters".

Another solution is to use Firefox, it supports user styles and these can't be fought.

Also, it's better to just report to uAssets next time.

@evenfrost
Copy link

Thanks for fast fix! 🎉

okiehsch added a commit to uBlockOrigin/uAssets that referenced this issue Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants