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

matches-path does't work with exception #3235

Open
9 tasks done
Yuki2718 opened this issue May 15, 2024 · 7 comments
Open
9 tasks done

matches-path does't work with exception #3235

Yuki2718 opened this issue May 15, 2024 · 7 comments

Comments

@Yuki2718
Copy link

Yuki2718 commented May 15, 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

On https://www.nicovideo.jp/search/%E4%BA%AC%E9%83%BD
These don't work

www.nicovideo.jp##li.item
www.nicovideo.jp#@#:matches-path(/search)li.item

Using an exception is an official way to handle such cases in AG: AdguardTeam/CoreLibs#124 (comment)

A specific URL where the issue occurs.

https://www.nicovideo.jp/search/%E4%BA%AC%E9%83%BD

Steps to Reproduce

Mentioned

Expected behavior

:matches-path() should work as well for exception. Preferably ignore whitespace differences: www.nicovideo.jp#@#:matches-path(/search)li.item and www.nicovideo.jp#@#:matches-path(/search) li.item

Actual behavior

Mentioned

uBO version

1.57.3b10

Browser name and version

Chrome 124.0.6367.203

Operating System and version

Windows 10

@gorhill
Copy link
Member

gorhill commented May 15, 2024

How about supporting negation in :matches-path?

www.nicovideo.jp#@#:matches-path(!/search) li.item

@Yuki2718
Copy link
Author

Isnt't that already possible by :not(:matches-path())? I'm more concerned about compatibility with AG lists.

@gorhill
Copy link
Member

gorhill commented May 15, 2024

Yes, you're right. For compatibility with AdGuard, the proper course is to support the same syntax, :matches-path is not suitable for compatibility with AG's [path=...].

@Yuki2718
Copy link
Author

A problem is currently all the [path=...] rules for uBO version are converted to :matches-path() on FiltersCompiler, though I can open an issue if this should not be done in future.

@krystian3w
Copy link

krystian3w commented May 16, 2024

You can try (I guess in 'uBo – unbreak'):

!+ PLATFORM(ext_ublock)
www.nicovideo.jp##:matches-path(/search) body li.item:style(display: list-item !important)

If display was not changed by webmaster to not standard.

@Yuki2718
Copy link
Author

Ofc I can fix whatever issues if it is me, but I don't know how other members fix issues.

@krystian3w
Copy link

krystian3w commented May 16, 2024

If you mean threads that will not reach uAssets or AdGuardFilters (or reddit), the only thing left to do is write something like Wiki in popular place:

! 'search' broken by "##.ads":
!
!#if env_ublock
! disable filter at page in uBo
example.org#@#.ads
! recover in needed places
example.org##:not(:matches-path(/search)) .ads
!#else
[path="search"]example.org#@#.ads
!#endif

Due to the number of filters, if instead of the old "PLATFORM" starts to make sense.

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