1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-01 02:02:29 +02:00
gwarser 2020-11-10 23:02:45 +01:00
parent e1f4b85523
commit 6f4f852475
19 changed files with 168 additions and 166 deletions

@ -80,7 +80,7 @@ Privacy Badger: warning from the browser: _"This extension is slowing down Chrom
Ultimately, if you **really** want to increase significantly control over your privacy, [HTTP Switchboard](https://github.com/gorhill/httpswitchboard#http-switchboard-for-chromium) is the way to go.
If web page breakage annoys you, just start using HTTP Switchboard in [allow-all/block-exceptionally mode](https://github.com/gorhill/httpswitchboard/wiki/How-to-use-HTTP-Switchboard:-Two-opposing-views#the-allow-allblock-exceptionally-approach),
and blacklist your way up from this starting point. Unlike uBlock and others here, HTTP Switchboard does not
and blocklist your way up from this starting point. Unlike uBlock and others here, HTTP Switchboard does not
have unseen exception filters which often defeat good blocking filters. For example, [**this**](https://github.com/gorhill/httpswitchboard/wiki/About-these-%22%E2%80%98virtually-impossible%E2%80%99-to-block%22-fingerprinting-tools#kind-of-low-breakage) is the way to foil many fingerprinting tricks, canvas fingerprinting included, without preventing javascript execution.
### Methodology
@ -106,4 +106,4 @@ The official [Public Suffix List](https://publicsuffix.org/list/) is used to det
**Note regarding the methodology:** It has been said that I was unfair toward ABP because I didn't
use [Peter Lowes Ad server](http://pgl.yoyo.org/) list for ABP while I did for uBlock. It is
true that I could have imported the list into ABP, which most certainly account for the difference
between ABP and uBlock. My answer to this is available at [Wilders Security Forum](http://www.wilderssecurity.com/threads/%C2%B5block-a-lean-and-fast-blocker.365273/page-3#post-2386023).
between ABP and uBlock. My answer to this is available at [Wilders Security Forum](http://www.wilderssecurity.com/threads/%C2%B5block-a-lean-and-fast-blocker.365273/page-3#post-2386023).

@ -6,7 +6,7 @@ This wiki page is out of date and in need of revision. When this documentation w
Since then things have changed: uBO no longer can see network requests from other extensions, and behind-the-scene network requests are now quite less frequent. Furthermore, the webRequest API now provides more context to event listeners, such that it is often possible to still filter properly even when it's not possible to know from which exact tab a network request originates.
Because of this (and other reasons which will eventually come to light - the ["Who Left Open The Cookie Jar?"](https://github.com/ghacksuserjs/ghacks-user.js/issues/489) vulnerability), starting with uBO 1.15.20, the `behind-the-scene` scope will no longer be whitelisted by default, meaning network requests from the behind-the-scene scope will be subject to filtering by default.
Because of this (and other reasons which will eventually come to light - the ["Who Left Open The Cookie Jar?"](https://github.com/ghacksuserjs/ghacks-user.js/issues/489) vulnerability), starting with uBO 1.15.20, the `behind-the-scene` scope will no longer be on trusted sites list by default, meaning network requests from the behind-the-scene scope will be subject to filtering by default.
***
@ -16,7 +16,7 @@ The filtering of behind-the-scene network request is available to [advanced user
_Behind-the-scene_ network requests are network requests which uBlock cannot associate with a specific tab in your browser: these requests come from _somewhere_, but uBlock is missing information to report exactly from where.
All network requests without a specific origin are classified as _behind-the-scene_. Typically, all blockers will ignore and automatically whitelist behind-the-scene network requests.
All network requests without a specific origin are classified as _behind-the-scene_. Typically, all blockers will ignore and automatically allow behind-the-scene network requests.
For the Chromium browser, examples of _behind-the-scene_ network requests:
@ -49,7 +49,7 @@ The ability to inspect behind-the-scene network requests is available to all use
The ability to filter _behind-the-scene_ network requests is only available when _"Advanced user"_ is enabled in the uBlock options.
The _behind-the-scene_ virtual tab is whitelisted by default. No filtering will occur even after you enable _"Advanced user"_ mode.
The _behind-the-scene_ virtual tab is on _Trusted sites_ list by default. No filtering will occur even after you enable _"Advanced user"_ mode.
To access the filtering settings for _behind-the-scene_ network requests, simply open the popup UI in the network request logger while the _"Behind the scene"_ entry is selected:
@ -61,8 +61,8 @@ The image above shows what happens when you navigate through Github: Github make
Remember that if you block indiscriminately, you could cripple the ability of your browser to update parts of itself or update extensions as well as the ability of extensions to work properly. This is why this is an advanced user feature.
To turn off the filtering of _behind-the-scene_ requests, whitelist the _"Behind the scene"_ scope or turn off _"Advanced user"_ mode.
To turn off the filtering of _behind-the-scene_ requests, allow the _"Behind the scene"_ scope or turn off _"Advanced user"_ mode.
To whitelist the _behind-the-scene_ scope, add `behind-the-scene` as a whitelist directive in the _Whitelist_ tab of the uBlock dashboard.
To allow the _behind-the-scene_ scope, add `behind-the-scene` as a trusted site directive in the _Trusted sites_ tab of the uBlock dashboard.
If there are only very specific behind-the-scene network requests you would like to filter, a good approach to minimize potential problems is to use dynamic filtering: set a local rule for the `all` cell to _allow_ (green) (i.e. `behind-the-scene * * allow`). This will ensure nothing is blocked in the _behind-the-scene scope_, just as if uBlock is disabled for that scope. Then create _block_ rules for the specific hostnames for which you want to block all network requests, or `noop` if you want to subject those hostnames to static filtering only.

@ -2,7 +2,7 @@
***
Roughly similar to using Adblock Plus with many filter lists + NoScript with 1st-party scripts/frames automatically whitelisted + RequestPolicy with 1st-party resources automatically whitelisted.
Roughly similar to using Adblock Plus with many filter lists + NoScript with 1st-party scripts/frames automatically trusted + RequestPolicy with 1st-party resources automatically whitelisted. <!-- note about RequestPolicy should be updated -->
Blocking-wise, this is a small leap from [medium mode](./Blocking-mode:-medium-mode). This mode will however lead to a higher likelihood of broken web sites, and thus will likely require intervention the first time you visit a site, since even passive 3rd-party resources (i.e. images, css) are blocked with this mode.

@ -2,7 +2,7 @@
***
Roughly similar to using Adblock Plus with many filter lists + NoScript with 1st-party scripts/frames automatically whitelisted. Unlike NoScript however, you can easily point-and-click to block/allow scripts _on a per-site basis_.
Roughly similar to using Adblock Plus with many filter lists + NoScript with 1st-party scripts/frames automatically trusted. Unlike NoScript however, you can easily point-and-click to block/allow scripts _on a per-site basis_.
Blocking-wise, this is one significant leap from [easy mode](./Blocking-mode:-easy-mode). However, be ready to accept that you will have to un-break websites, though at a lesser rate than [hard mode](./Blocking-mode:-hard-mode), since passive 3rd-party resources (i.e. images, css) are not blocked in medium mode.

@ -36,7 +36,7 @@ The import/export of cloud storage data in a pane works strictly at the UI level
If ever an export operation causes the cloud storage capacity limit to be reached, typically the cloud storage providers will refuse the operation, and the data on the cloud storage will be left unchanged. This is what I have observed with Chromium-based browsers.
If you do not have a syncing account with your browser vendor, I have observed that the cloud storage feature can still be used as a local clipboard to save a pane settings. Might be convenient sometimes, but please do not use cloud storage as a replacement for [uBlock Origin's backup feature](./Dashboard:-Settings#backuprestore-section). It is recommended you back up your settings regularly, this is especially true for those who have extensive custom static filters, custom rules, whitelist directives.
If you do not have a syncing account with your browser vendor, I have observed that the cloud storage feature can still be used as a local clipboard to save a pane settings. Might be convenient sometimes, but please do not use cloud storage as a replacement for [uBlock Origin's backup feature](./Dashboard:-Settings#backuprestore-section). It is recommended you back up your settings regularly, this is especially true for those who have extensive custom static filters, custom rules, trusted sites directives.
> ***
> **Important:**

@ -0,0 +1,38 @@
- Back to [Wiki home](./)
- Back to [Dashboard](./Dashboard)
***
The _Trusted sites_ pane lists all the _trusted site directives_. The purpose of a trusted site directive is to tell on which page uBlock Origin ("uBO") should disable itself completely. When uBO is disabled on a page, there will be no filtering applied to that page.
When uBO is disabled for a site, its toolbar icon will be grayed, and the large blue "power" button in the popup panel is dimmed.
When you visit a web page, uBO will try to match the URL of the page in the address bar against the existing trusted site directives. When there is a match, uBO will be disabled for that page.
The easiest way to create a trusted site directive is by toggling the large "power" button in uBO's popup panel -- this will cause a site-wide trusted site directive for the current site to be automatically created and added to the _Trusted sites_ pane.
The _Trusted sites_ pane allows you to review or edit the exisiting trusted site directives, or to manually add new ones.
### Important: read carefully
There are predefined trusted site directives when you first install uBO:
about-scheme
chrome-extension-scheme
chrome-scheme
moz-extension-scheme
opera-scheme
vivaldi-scheme
wyciwyg-scheme
For Firefox Legacy platform, `behind-the-scene` is also in this predefined trusted sites list.
You should not remove these predefined trusted site directives, unless you know _exactly_ the consequences of doing so.
Removing the predefined trusted site directives without understanding the consequences could cause your browser to malfunction. **This is especially true for the `behind-the-scene` trusted site directive on Firefox Legacy platform.**
If despite this warning you still want to remove one or more of the predefined trusted site directives, I strongly suggest to comment out an entry rather than outright delete it. To comment out an entry, just prefix it with `# `. This way you do not have to remember which predefined trusted site directive you removed, it will be just a matter of removing the `# ` prefix if ever you want to restore an entry. After [1.19.3b7 ](https://github.com/gorhill/uBlock/commit/f7bbc807176fa93680fdaf8b713593a43a3df2a5) removed _predefined trusted site directives_ are commented out automatically.
### Trusted sites directive syntax
Further details about the supported syntax for trusted site directives can be found at ["How to mark a web site as trusted"](./How-to-mark-a-web-site-as-trusted).

@ -1,38 +1 @@
- Back to [Wiki home](./)
- Back to [Dashboard](./Dashboard)
***
The _Whitelist_ pane lists all the _whitelist directives_. The purpose of a whitelist directive is to tell on which page uBlock Origin ("uBO") should disable itself completely. When uBO is disabled on a page, there will be no filtering applied to that page.
When uBO is disabled for a site, its toolbar icon will be grayed, and the large blue "power" button in the popup panel is dimmed.
When you visit a web page, uBO will try to match the URL of the page in the address bar against the existing whitelist directives. When there is a match, uBO will be disabled for that page.
The easiest way to create a whitelist directive is by toggling the large "power" button in uBO's popup panel -- this will cause a site-wide whitelist directive for the current site to be automatically created and added to the _Whitelist_ pane.
The _Whitelist_ pane allows you to review or edit the exisiting whitelist directives, or to manually add new ones.
### Important: read carefully
There are predefined whitelist directives when you first install uBO:
about-scheme
chrome-extension-scheme
chrome-scheme
moz-extension-scheme
opera-scheme
vivaldi-scheme
wyciwyg-scheme
For Firefox Legacy platform, `behind-the-scene` is also in this predefined whitelist.
You should not remove these predefined whitelist directives, unless you know _exactly_ the consequences of doing so.
Removing the predefined whitelist directives without understanding the consequences could cause your browser to malfunction. **This is especially true for the `behind-the-scene` whitelist directive on Firefox Legacy platform.**
If despite this warning you still want to remove one or more of the predefined whitelist directives, I strongly suggest to comment out an entry rather than outright delete it. To comment out an entry, just prefix it with `# `. This way you do not have to remember which predefined whitelist directive you removed, it will be just a matter of removing the `# ` prefix if ever you want to restore an entry. After [1.19.3b7 ](https://github.com/gorhill/uBlock/commit/f7bbc807176fa93680fdaf8b713593a43a3df2a5) removed _predefined whitelist directives_ are commented out automatically.
### Whitelist directive syntax
Further details about the supported syntax for whitelist directives can be found at ["How to whitelist a web site"](./How-to-whitelist-a-web-site).
Moved to: [Dashboard: Trusted sites](./Dashboard:-Trusted-sites)

@ -10,7 +10,7 @@ Dynamic filtering is available to [advanced users](./Advanced-user-features). Dy
- [Rule precedence](./Dynamic-filtering:-precedence)
- [Blocking modes](./Blocking-mode)
- [Turn off uBlock everywhere](./Dynamic-filtering:-turn-off-uBlock-everywhere)
- [Turn off uBlock everywhere _except_... (blacklist mode)](./Dynamic-filtering:-turn-off-uBlock-everywhere-except)
- [Turn off uBlock everywhere _except_... (blocklist mode)](./Dynamic-filtering:-turn-off-uBlock-everywhere-except)
- [Dynamic filtering usefulness/benefits](./Dynamic-filtering---examples) (dated)
- [Default-deny](./Dynamic-filtering:-default-deny) (dated)
- [Default-deny: useful rulesets](./Dynamic-filtering:-default-deny:-useful-rulesets)

@ -2,7 +2,7 @@
***
First: Whitelist directives override both dynamic filtering _and_ static filtering. Whitelist directives appear in the [_Whitelist_ pane in the dashboard](./How-to-whitelist-a-web-site), and they are used to completely disable filtering. The [big blue button in the popup UI](./Quick-guide:-popup-user-interface#the-large-power-button) is used to easily whitelist the current site/page.
First: Trusted site directives override both dynamic filtering _and_ static filtering. Trusted site directives appear in the [_Trusted sites_ pane in the dashboard](./How-to-mark-a-web-site-as-trusted), and they are used to completely disable filtering. The [big blue button in the popup UI](./Quick-guide:-popup-user-interface#the-large-power-button) is used to easily add current site/page to the _Trusted sites_ list.
***

@ -72,7 +72,7 @@ Just like type-based rules, a hostname-based rule can apply only when visiting a
A matching rule can do one of three things:
- `block`: matching network request will be blocked.
- `block` dynamic filter rules override any existing [static exception filters](https://adblockplus.org/en/filters#whitelist).
- `block` dynamic filter rules override any existing static exception filters.
- Thus you can use them to block with 100% certainty (unless you set another overriding dynamic filter rule).
- `allow`: matching network request will be allowed.
- `allow` dynamic filters rules override any existing static and dynamic block filters.

@ -2,7 +2,7 @@
***
"Blacklist mode" can be achieved in UBO [Advanced users](./Advanced-user-features) mode in following way:
"Blocklist mode" can be achieved in UBO [Advanced users](./Advanced-user-features) mode in following way:
- global allow `all` cell
- "global" = 1st column
@ -13,7 +13,7 @@
Nothing will be blocked, static filtering is completely bypassed: "green" means "allow unconditionally".
To "blacklist" a specific site:
To "blocklist" a specific site:
- local noop `all` cell
- "local" = 2nd column

@ -24,8 +24,8 @@
- [Rule precedence](./Dynamic-filtering:-precedence)
- [Blocking mode](./Blocking-mode)
- [URL filtering](./Dynamic-URL-filtering)
- [_Whitelist_ pane](./Dashboard:-Whitelist)
- [How to whitelist a web site](./How-to-whitelist-a-web-site)
- [_Trusted sites_ pane](./Dashboard:-Trusted-sites)
- [How to mark a web site as trusted](./How-to-mark-a-web-site-as-trusted)
- [Keyboard shortcuts](./Keyboard-shortcuts)
- [The logger](./The-logger)
- [DOM inspector](./DOM-inspector)

@ -0,0 +1,102 @@
- Back to [Wiki home](./)
- Back to [Dashboard](./Dashboard)
- Back to [Trusted sites pane](./Dashboard:-Trusted-sites)
***
- [Big power button](#click-the-big-power-button)
- [Detailed syntax](#detailed-syntax)
- [Plain hostname](#plain-hostname)
- [Single web page](#single-web-page)
- [Section of a web site](#section-of-a-web-site)
- [Specific pattern](#specific-pattern)
- [Regular expression](#regular-expression-1917)
- [Disable filtering on YouTube channel](#disable-filtering-on-youtube-channel)
- [Disabling filtering temporarily or by default (blocklist mode)](#disabling-filtering-temporarily-or-by-default-blocklist-mode)
- [Other details](#other-details)
***
### Click the big power button
It serves to turn off blocking **on the current web site** (will add current site to _Trusted sites_ list), and its state will be remembered next time you visit the web site.
| uBO is enabled | uBO is disabled |
| -------------- | --------------- |
| ![uBO enabled](https://user-images.githubusercontent.com/585534/89903803-1caf4200-dbb6-11ea-95b2-16a807781de0.png) | ![uBO disabled](https://user-images.githubusercontent.com/585534/89904193-9fd09800-dbb6-11ea-9b29-db2506fe577f.png) |
### Detailed syntax
All trusted site directives are matched against the URL address of web pages.
As of version uBlock 0.8.2.0, the trusted site directive syntax is split into three classes:
- Plain
- Complex
- Comment
Plain syntax is when using only hostname label(s), which means only the hostname portion of a URL will be taken into account. With plain syntax, the matching is performed by comparing the right-most portion of the page hostname with the trusted site directive. Wildcards are not allowed when using plain syntax.
Complex syntax occurs if and only if at least one `/` appears in a trusted site directive. Optionally, the wildcard `*` can be used with complex directives for more flexibility.
A comment is a line prefixed with `#`. Comments are ignored by uBlock.
If no `/` appears in a trusted site directive, and if the directive contains characters which are not allowed for a plain hostname, then the trusted site directive will be commented out and ignored by uBlock. This allows you to fix your directive.
#### Plain hostname
- `example.com`: matches on all pages from `example.com` or above (i.e. `example.com`, `www.example.com`).
- `www.example.org`: matches on all pages from `www.example.org` or above (i.e. `www.example.org`, `forums.www.example.org`, but not `example.org`).
- `org`: matches on all pages from TLD `org` (i.e. `example.org`, `wikipedia.org`).
#### Single web page
- `https://www.twitch.tv/letofski`: matches on only this one page, i.e. when the URL in the address bar **matches exactly** `https://www.twitch.tv/letofski`.
#### Section of a web site
- `https://www.twitch.tv/letofski*`: matches on this one page, and everything underneath, i.e. when the URL in the address bar **starts exactly** with `https://www.twitch.tv/letofski`.
#### Specific pattern
- `*reddit.com/r/privacy/*`
Wildcards can be used at any position. However, when a wildcard is used within the hostname portion of a directive, it cannot be at the end of the hostname, and also must be at the boundary of a hostname label.
#### Regular expression
- `/^https?://192\.168\.0\.\d+//`
- `/^https://[0-9a-z-]+//`
When you are facing a case where no other directive syntax work, you may use a regular expression ("regex") as a last resort solution. When a trusted site directive starts and ends with a forward slash (`/`), uBO will treat the directive as a regex-based one.
Given that trusted site directives dictate where uBO should be completely disabled, be very careful with regex-based directives, you could easily mistakenly cause uBO to be disabled on more sites than you intended. Typically, only advanced users will resort to regex-based directives, and only for cases where no other syntax can do the job.
### Disable filtering on YouTube channel
There are two ways to do this:
1. By [browser extension](https://github.com/x0a/YouTube-Channel-Whitelist-for-uBlock-Origin#youtube-channel-whitelist-for-ublock-origin).
Kept updated, should be easy to use, point and click, with good description of usage.
2. Using one of the [user scripts from Greasy Fork](https://greasyfork.org/en/scripts?q=YouTube+whitelist+channels+in+uBlock+Origin&sort=updated) based on [YouTube - whitelist channels in uBlock Origin](https://greasyfork.org/en/scripts/13226-youtube-whitelist-channels-in-ublock-origin).
Simple, with clearly visible code, but can be outdated. Someone posted instructions on Reddit, it was years ago, but explains few things: ["Any way to whitelist certain youtube channels?"](https://www.reddit.com/r/ublock/comments/4x4jol/any_way_to_whitelist_certain_youtube_channels/).
**Warning!** These are third party tools, I can't vouch for them, you will have to find out for yourself whether they work.
### Disabling filtering temporarily or by default (blocklist mode)
**Be aware!** Following abilities are just side effects of uBO features and no additional work will be done to improve support for them<sup>[1](https://github.com/uBlockOrigin/uBlock-issues/issues/91#issuecomment-400282591),[2](https://github.com/uBlockOrigin/uBlock-issues/issues/586#issuecomment-494021002)</sup>.
Following pages describe how to disable filtering with help of [dynamic filtering](./Dynamic-filtering):
- [Turn off uBlock everywhere temporarily](./Dynamic-filtering:-turn-off-uBlock-everywhere)
- [Turn off uBlock everywhere _except_ (blocklist mode)](./Dynamic-filtering:-turn-off-uBlock-everywhere-except).
Blocklist mode can also be achieved by specifically crafted Regular Expression trusted site directive:
/^((?!example\.com|different\.example\.net|another\.example\.org).)*$/
With this directive all domains put between `|` characters will be treated as _blocklisted_, and uBO will be enabled only on these pages.
### Other details
If you re-enable uBlock by clicking the big power button in the popup while a trusted site directive you handcrafted is in effect, your handcrafted directive will simply be commented out. This way you can bring it back to life if ever you clicked the button by mistake.

@ -1,102 +1 @@
- Back to [Wiki home](./)
- Back to [Dashboard](./Dashboard)
- Back to [Whitelist pane](./Dashboard:-Whitelist)
***
- [Big power button](#click-the-big-power-button)
- [Detailed syntax](#detailed-syntax)
- [Plain hostname](#plain-hostname)
- [Single web page](#single-web-page)
- [Section of a web site](#section-of-a-web-site)
- [Specific pattern](#specific-pattern)
- [Regular expression](#regular-expression-1917)
- [Whitelisting Youtube channel](#whitelisting-youtube-channel)
- [Disabling filtering temporarily or by default (blacklist mode)](#disabling-filtering-temporarily-or-by-default-blacklist-mode)
- [Other details](#other-details)
***
### Click the big power button
It serves to whitelist the current web site, and its state will be remembered next time you visit the web site.
| uBO is enabled | uBO is disabled |
| -------------- | --------------- |
| ![uBO enabled](https://user-images.githubusercontent.com/585534/89903803-1caf4200-dbb6-11ea-95b2-16a807781de0.png) | ![uBO disabled](https://user-images.githubusercontent.com/585534/89904193-9fd09800-dbb6-11ea-9b29-db2506fe577f.png) |
### Detailed syntax
All whitelist directives are matched against the URL address of web pages.
As of version uBlock 0.8.2.0, the whitelist directive syntax is split into three classes:
- Plain
- Complex
- Comment
Plain syntax is when using only hostname label(s), which means only the hostname portion of a URL will be taken into account. With plain syntax, the matching is performed by comparing the right-most portion of the page hostname with the whitelist directive. Wildcards are not allowed when using plain syntax.
Complex syntax occurs if and only if at least one `/` appears in a whitelist directive. Optionally, the wildcard `*` can be used with complex directives for more flexibility.
A comment is a line prefixed with `#`. Comments are ignored by uBlock.
If no `/` appears in a whitelist directive, and if the directive contains characters which are not allowed for a plain hostname, then the whitelist directive will be commented out and ignored by uBlock. This allows you to fix your directive.
#### Plain hostname
- `example.com`: whitelist all pages from `example.com` or above (i.e. `example.com`, `www.example.com`).
- `www.example.org`: whitelist all pages from `www.example.org` or above (i.e. `www.example.org`, `forums.www.example.org`, but not `example.org`).
- `org`: whitelist all pages from TLD `org` (i.e. `example.org`, `wikipedia.org`).
#### Single web page
- `https://www.twitch.tv/letofski`: whitelist only this one page, i.e. when the URL in the address bar **matches exactly** `https://www.twitch.tv/letofski`.
#### Section of a web site
- `https://www.twitch.tv/letofski*`: whitelist this one page, and everything underneath, i.e. when the URL in the address bar **starts exactly** with `https://www.twitch.tv/letofski`.
#### Specific pattern
- `*reddit.com/r/privacy/*`
Wildcards can be used at any position. However, when a wildcard is used within the hostname portion of a directive, it cannot be at the end of the hostname, and also must be at the boundary of a hostname label.
#### Regular expression (1.9.17+)
- `/^https?://192\.168\.0\.\d+//`
- `/^https://[0-9a-z-]+//`
When you are facing a case where no other directive syntax work, you may use a regular expression ("regex") as a last resort solution. When a whitelist directive starts and ends with a forward slash (`/`), uBO will treat the directive as a regex-based one.
Given that whitelist directives dictate where uBO should be completely disabled, be very careful with regex-based directives, you could easily mistakenly cause uBO to be disabled on more sites than you intended. Typically, only advanced users will resort to regex-based directives, and only for cases where no other syntax can do the job.
### Whitelisting Youtube channel
There are two ways to do this:
1. By [browser extension](https://github.com/x0a/YouTube-Channel-Whitelist-for-uBlock-Origin#youtube-channel-whitelist-for-ublock-origin).
Kept updated, should be easy to use, point and click, with good description of usage.
2. Using one of the [user scripts from Greasy Fork](https://greasyfork.org/en/scripts?q=YouTube+whitelist+channels+in+uBlock+Origin&sort=updated) based on [YouTube - whitelist channels in uBlock Origin](https://greasyfork.org/en/scripts/13226-youtube-whitelist-channels-in-ublock-origin).
Simple, with clearly visible code, but can be outdated. Someone posted instructions on Reddit, it was years ago, but explains few things: ["Any way to whitelist certain youtube channels?"](https://www.reddit.com/r/ublock/comments/4x4jol/any_way_to_whitelist_certain_youtube_channels/).
**Warning!** These are third party tools, I can't vouch for them, you will have to find out for yourself whether they work.
### Disabling filtering temporarily or by default (blacklist mode)
**Be aware!** Following abilities are just side effects of uBO features and no additional work will be done to improve support for them<sup>[1](https://github.com/uBlockOrigin/uBlock-issues/issues/91#issuecomment-400282591),[2](https://github.com/uBlockOrigin/uBlock-issues/issues/586#issuecomment-494021002)</sup>.
Following pages describe how to disable filtering with help of [dynamic filtering](./Dynamic-filtering):
- [Turn off uBlock everywhere temporarily](./Dynamic-filtering:-turn-off-uBlock-everywhere)
- [Turn off uBlock everywhere _except_ (blacklist mode)](./Dynamic-filtering:-turn-off-uBlock-everywhere-except).
Black list mode can also be achieved by specifically crafted Regular Expression whitelist directive:
/^((?!example\.com|different\.example\.net|another\.example\.org).)*$/
With this directive all domains put between `|` characters will be treated as _blacklisted_, and uBO will be enabled only on these pages.
### Other details
If you re-enable uBlock by clicking the whitelist button in the popup while a whitelist directive you handcrafted is in effect, your handcrafted whitelist directive will simply be commented out. This way you can bring it back to life if ever you un-whitelist by mistake.
Moved to: [How to mark a web site as trusted](./How-to-mark-a-web-site-as-trusted)

@ -64,4 +64,4 @@ It's unclear if, and how much this breaks things. But will prevent your browsing
But this applies to any domain which is ubiquitous enough, `gravatar.com` is just one example among so many.
To deal with this easily, [uMatrix](https://github.com/gorhill/uMatrix) is the best tool, as to blacklist a ubiquitous domain with 100% certainty is simply a matter of point and click.
To deal with this easily, [uMatrix](https://github.com/gorhill/uMatrix) is the best tool, as to blocklist a ubiquitous domain with 100% certainty is simply a matter of point and click.

@ -26,11 +26,11 @@ Amount of visible information can be adjusted by clicking on "More" and "Less" b
![large blue power button](https://user-images.githubusercontent.com/886325/85211203-1d122600-b347-11ea-8271-a60449a57c8b.png)
Click the large power button to turn off uBlock **for the current site** (a.k.a. _whitelist_ the current site). This will be remembered the next time you visit the site.
Click the large power button to turn off uBlock **for the current site** (add current site to _Trusted sites_ list). This will be remembered the next time you visit the site.
Alternatively, you can also <kbd>Ctrl</kbd>-click to turn off uBlock only for the current page (<kbd>Cmd</kbd>-click on Mac).
For more advanced whitelisting control, see ["How to whitelist a web site"](./How-to-whitelist-a-web-site).
For more advanced control, see ["How to mark a web site as trusted"](./How-to-mark-a-web-site-as-trusted).
***

@ -21,11 +21,11 @@ Starting with 1.26.0 (commit [one](https://github.com/gorhill/uBlock/commit/703c
## Not supported
#### `document` for [_entire page exception_](https://adblockplus.org/filters#whitelist)
#### `document` for [_entire page exception_](https://help.eyeo.com/en/adblockplus/how-to-write-filters#allowlist)
Not supported. The purpose of the `document` option when used with an exception filter is to disable uBO completely. The purpose of the `document` option in static exception filters is mostly for the sake of "acceptable ads" support, which uBO does not support.
The reason it is not supported is to be sure that users explicitly disable uBO themselves if they wish (through [whitelisting](./How-to-whitelist-a-web-site)), not having some external filter list decide for them.
The reason it is not supported is to be sure that users explicitly disable uBO themselves if they wish (through [Trusted sites](./How-to-mark-a-web-site-as-trusted) feature), not having some external filter list decide for them.
Note: it [still works](https://github.com/gorhill/uBlock/issues/1754) to negate [strict blocking](./Strict-blocking) when explicitly enabled by blocking filter `document` option.
@ -277,7 +277,7 @@ Exception filter for specific `csp` blocking filter must have exactly the same c
@@||example.com^$csp
CSP option syntax may look unusual compared to other filters. It works mostly in "whitelist" mode - data can be downloaded only from addresses explicitly specified in this option. Refer to ["Content Security Policy (CSP)
CSP option syntax may look unusual compared to other filters. It works mostly in "allowlist" mode - data can be downloaded only from addresses explicitly specified in this option. Refer to ["Content Security Policy (CSP)
Quick Reference Guide"](https://content-security-policy.com/) or [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) for further syntax help.
See also [`denyallow`](#denyallow).

@ -6,7 +6,7 @@ In response to this [ridiculously over-the-top pure propaganda](http://www.tomsg
**Left:** without a blocker: 124 domains (note that I had Flash plug-in disabled, it would have been worse if it had been enabled -- I wasn't ready to go that far to make my point).
**Right:** default-deny with whitelisting of site's own domains (`bestofmedia.com`, `bestofmicro.com`): 3 domains. Page appeared properly rendered.
**Right:** default-deny with noop'ing of site's own domains (`bestofmedia.com`, `bestofmicro.com`): 3 domains. Page appeared properly rendered.
The content of the picture below is not fabricated, it's really what was reported by uBlock.

@ -22,8 +22,8 @@
- [Rule precedence](./Dynamic-filtering:-precedence)
- [Blocking mode](./Blocking-mode)
- [URL filtering](./Dynamic-URL-filtering)
- [_Whitelist_ pane](./Dashboard:-Whitelist)
- [How to whitelist a web site](./How-to-whitelist-a-web-site)
- [_Trusted sites_ pane](./Dashboard:-Trusted-sites)
- [How to mark a web site as trusted](./How-to-mark-a-web-site-as-trusted)
- [Keyboard shortcuts](./Keyboard-shortcuts)
- [The logger](./The-logger)
- [DOM inspector](./DOM-inspector)