mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Add $permissions
parent
c569933cb6
commit
78e3a8764e
1 changed files with 32 additions and 0 deletions
|
@ -173,6 +173,7 @@ uBO extends ABP filter syntax.
|
|||
- [$method](#method)
|
||||
- [$object](https://help.adblockplus.org/hc/en-us/articles/360062733293#options)
|
||||
- [$other](https://help.adblockplus.org/hc/en-us/articles/360062733293#options)
|
||||
- [$permissions](#permissions)
|
||||
- [$ping](#ping)
|
||||
- [$popunder](#popunder)
|
||||
- [$popup](https://help.adblockplus.org/hc/en-us/articles/360062733293#options)
|
||||
|
@ -574,6 +575,37 @@ The logger shows the method used for every network request. It's possible to fil
|
|||
|
||||
***
|
||||
|
||||
#### `permissions`
|
||||
|
||||
New in [1.50.1b16](https://github.com/gorhill/uBlock/commit/5ebdbf3e24393560156fdcd931e31f901471f7f3).
|
||||
|
||||
Permissions Policy provides mechanisms to explicitly declare what functionality can and cannot be used on a website. It is similar to [Content Security Policy](#csp) but controls features instead of security behavior.
|
||||
|
||||
Examples of what you can do with Permissions Policy:
|
||||
- Change the default behavior of autoplay on mobile and third-party videos.
|
||||
- Restrict a site from using sensitive devices like the camera, microphone, or speakers.
|
||||
- Allow iframes to use the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
|
||||
Related discussion:
|
||||
https://github.com/uBlockOrigin/uBlock-issues/discussions/2714
|
||||
|
||||
Reference:
|
||||
- https://adguard.com/kb/general/ad-filtering/create-own-filters/#permissions-modifier
|
||||
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
|
||||
|
||||
Example:
|
||||
```adb
|
||||
||example.com^$permissions=browsing-topics=()
|
||||
```
|
||||
|
||||
Difference with AdGuard's syntax: use `|` to separate permissions policy directives instead of `\,` -- uBO will replace instances of `|` with `, `:
|
||||
|
||||
```adb
|
||||
*$permissions=oversized-images=()|unsized-media=()
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
#### `ping`
|
||||
|
||||
Blocks requests send by the [`ping`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-ping) attribute on links and [Navigator.sendBeacon()](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon).
|
||||
|
|
Loading…
Reference in a new issue