-
Notifications
You must be signed in to change notification settings - Fork 472
How to work only with global rules and all scripts blocked by default
The way you work your ruleset with uMatrix is not dictated by uMatrix. If you want to work strictly with global rules, i.e. rules that apply everywhere, uMatrix allows that.
Using an example page, this is uMatrix with out-of-the-box ruleset -- by default uMatrix is set up to work with per-base domain rules:
From there, we will set up uMatrix to work as follow:
- All rules will be global.
- All script and frame resources will be blocked by default.
- Scripts and frames from a specific domain will be whitelisted/blacklisted with a single click on that domain.
First, select "Global" as the default scope in uMatrix's Settings:
From now on, the global scope will always be selected by default when you open the popup panel:
Now we will change the out-of-the-box ruleset to achieve our goal of working only with global rules and to only block/allow scripts and frames, i.e. everything else will be allowed by default. All these modifications to the default ruleset can be done from the popup panel:
As seen in the picture above:
- The global scope is now always selected by default.
- The cookie, media, XHR, and other cells were whitelisted.
- The frame cell was un-blacklisted.
- The 1st-party cell was un-whitelisted.
- The 1st-party/frame cell was un-whitelisted.
Now persist these changes by clicking the padlock icon (which should report that 7 rules were changed):
This is it.
Scripts and frames are now blocked everywhere, and simply creating an allow rule directly on whatever domain will enable scripts and frames to be loaded for that domain. If you persist such rule by clicking on the padlock, they become permanently part of your ruleset, and applies everywhere since they are created in the global scope.
For example: create allow rules for googlevideo.com
, youtube.com
, and ytimg.com
in the global scope (which is now always selected by default) and persist them with the padlock. You can now have embedded Youtube videos properly play on all sites:
If you care to deal with base domains only, then just collapse base domain sections by default:
You can expand specific base domain sections independently of the others if ever you want to set more granular subdomain-level rules.
uMatrix: Point and click matrix to filter net requests according to source, destination and type.