AdguardTeam / AdguardTeam/AdguardBrowserExtension
Add support for `:remove-attr()` and `:remove-class()` from uBlock Origin
- Vorherrschende Sprache
- TypeScript
- Sterne
- 4.4k
- Forks
- 449
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Issue Details
I would like to see support for the [`:remove-attr()` and `:remove-class()` operators](https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#subjectremove-attrarg-subjectremove-classarg) used in uBlock Origin.
AdGuard's documentation for [`remove-attr`](https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#remove-attr) and [`remove-class`](https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#-%EF%B8%8F-remove-class) link to a uBO JS scriptlet of the same name. However, those uBO scriptlets were deprecated in favor of the previously mentioned remove operators. As a result, removing an attribute requires two different filters to ensure compatibility with both AdGuard and uBlock Origin.
```
! AdGuard compatible
example.com#%#//scriptlet('remove-attr', 'href', 'a')
! uBlock Origin compatible
example.com##a:remove-attr(href)
```
### Proposed solution
Implement uBlock Origin's `:remove-attr()` and `:remove-class()` operators in a way that filters can be compatible with both. (It can silently convert them to the scriptlet methods)
### Alternative solution
_No response_
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.