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

Blocking googlesyndication.com causes ##ins.adsbygoogle[data-ad-slot] not being applied #3203

Closed
9 tasks done
Yuki2718 opened this issue Apr 11, 2024 · 6 comments
Closed
9 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@Yuki2718
Copy link

Yuki2718 commented Apr 11, 2024

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

As the title says.

A specific URL where the issue occurs.

https://webtan.impress.co.jp/n/2017/05/12/25720

Steps to Reproduce

  1. Visit the site and see this leftover which should be partly hidden. Will be the same even if you add ##ins.adsbygoogle[data-ad-slot] to My filters.

leftover

  1. Disable all the three lists Unblock googlesyndication.com by dynamic rule and add ##ins.adsbygoogle[data-ad-slot] if not yet done, refresh the page and see now the placeholder is partly hidden.

hidden

Expected behavior

##ins.adsbygoogle[data-ad-slot] should be applied as no $generichide or whatsoever

Actual behavior

Described

uBO version

1.57.0

Browser name and version

Chrome 123.0.6312.106 and Firefox 124.0.2

Operating System and version

Windows 10

@gwarser
Copy link

gwarser commented Apr 11, 2024

Requires :watch-attr().


It's initially ins.adsbygoogle_ph.

@Yuki2718 Yuki2718 changed the title Enabling either uBlock filters - Ads, Easylist, or Peter Lowe’s list causes ##ins.adsbygoogle[data-ad-slot] not being applied Blocking googlesyndication.com causes ##ins.adsbygoogle[data-ad-slot] not being applied Apr 11, 2024
@gwarser
Copy link

gwarser commented Apr 11, 2024

Also does not work. No idea.

When element is visible, so it's not _ph, after reload the filter from EasyList is applied.


Yyyyy, because procedurals require to be specific??


Works when specific :?

@Yuki2718
Copy link
Author

Yes, works if specific. So maybe the problem is in DOM surveyor?

Yuki2718 added a commit to AdguardTeam/AdguardFilters that referenced this issue Apr 11, 2024
@gorhill
Copy link
Member

gorhill commented Apr 11, 2024

The surveyor does not trigger on attribute changes, only on layout changes. View-source shows that the class name is adsbygoogle_ph:

<div id="bancho_adsense_nodefooter" style="margin:0; display:flex; flex-wrap:wrap; justify-content:space-around; gap:1em 0; padding:.5em 0; overflow:hidden">
    <div style="display:inline-block; width:300px; max-width:300px; margin:0; overflow:hidden">
        <ins class="adsbygoogle_ph" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-4894439427301282" data-ad-slot="1000693078" data-ad-format="auto"></ins>
    </div>
    <div style="display:inline-block; width:300px; max-width:300px; margin:0; overflow:hidden">
        <ins class="adsbygoogle_ph" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-4894439427301282" data-ad-slot="2477426276" data-ad-format="auto"></ins>
    </div>
</div>

It works if relying on the attribute which does not change:

##ins[data-ad-slot]

Or when using specific filter:

impress.co.jp##ins.adsbygoogle[data-ad-slot]

I consider this is a duplicate of gorhill/uBlock#1885, see my comment closing the issue.

@gorhill gorhill closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
@gorhill gorhill added the duplicate This issue or pull request already exists label Apr 11, 2024
@Yuki2718
Copy link
Author

All right, I'll ask filter authors if we can change the rule to ##ins[data-ad-slot].

@gorhill
Copy link
Member

gorhill commented Apr 12, 2024

All right, I'll ask filter authors if we can change the rule to ##ins[data-ad-slot]

Not worth risking breaking what works well now for the sake of one case found which requires an easy workaround. ins[data-ad-slot] would be unconditionally injected on all sites as it can't be handled by the surveyor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants