1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Updated Deploying uBlock Origin (markdown)

Raymond Hill 2024-01-26 13:23:36 -05:00
parent b99fb5033a
commit 3377ae36e4

@ -12,15 +12,14 @@ I do not know much about enterprise deployment, so I will let a knowledgeable pe
### Customizing the settings
Administrators can force specific configurations to deploy uBlock Origin (uBO). At launch time, uBO will look for a setting named `adminSettings`, and if it exists, it will parse, extract and overwrite a user's settings with the administrator-assigned ones. Note that Chromium managed storage is not always ready on first browser start after change, and up to three restarts may be needed for settings to be applied to uBO, see [#1547](https://github.com/uBlockOrigin/uBlock-issues/issues/1547), [#1608](https://github.com/uBlockOrigin/uBlock-issues/issues/1608).
Administrators can force specific configurations to deploy uBlock Origin (uBO). See ["Deploying uBlock Origin: configuration"](./Deploying-uBlock-Origin:-configuration). This is the recommended way to pre-configure uBO. New standalone settings are getting added as per demand.
New standalone settings are getting added as per demand. See ["Deploying uBlock Origin: configuration"](./Deploying-uBlock-Origin:-configuration).
For **Firefox**, the setting can be configured in ["Native manifests"](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests) and [Policies](https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson). Refer to Mozilla documentation about ["Managed storage manifests"](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#managed_storage_manifests) and [its location](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location) for the Native manifests approach. See Mozilla's [policy template](https://github.com/mozilla/policy-templates#3rdparty) for the Policies approach. You can also consult [this specific comment](https://github.com/gorhill/uBlock/issues/2986#issuecomment-364035002) in uBO issue tracker.
For **Firefox**, the setting can be configured in ["Native manifests"](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests) and [Policies](https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson). Refer to Mozilla documentation about ["Managed storage manifests"](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#managed_storage_manifests) and [its location](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#manifest_location) for the Native manifests approach. See Mozilla's [policy template](https://github.com/mozilla/policy-templates#3rdparty) for the Policies approch. You can also consult [this specific comment](https://github.com/gorhill/uBlock/issues/2986#issuecomment-364035002) in uBO issue tracker.
For **Chrome**, see <https://www.chromium.org/administrators/configuring-policy-for-extensions/>.
For **Chrome**, `adminSettings` must be an entry part of the policy for the extension. See <https://www.chromium.org/administrators/configuring-policy-for-extensions/>.
For managing **Chrome** via **Google Workspace**, you can use [this apps-script](https://github.com/Landsil/apps_script--GoogleWorkspace-API/blob/master/uBlock_Origin_GSuite_policy.gs) to generate a policy JSON that will modify Trusted Sites for all designated users.
<details><summary>Deprecated approach -- avoid if you can</summary>
At launch time, uBO will look for a setting named `adminSettings`, and if it exists, it will parse, extract and overwrite a user's settings with the administrator-assigned ones. Note that Chromium managed storage is not always ready on first browser start after change, and up to three restarts may be needed for settings to be applied to uBO, see [#1547](https://github.com/uBlockOrigin/uBlock-issues/issues/1547), [#1608](https://github.com/uBlockOrigin/uBlock-issues/issues/1608).
The content of `adminSettings` is pretty straightforward: configure uBO as you wish for your users, then create a backup using the _"Backup to file"_ in the _Settings_ pane. Now open this backup file using a text editor, and remove all entries you do not want to overwrite while taking care to end up with a valid JSON file (mind trailing commas, etc.). All the entries left are the ones that will become overwritten on the user's side.
@ -34,6 +33,9 @@ For example, I created a backup file after having customized uBO and removed eve
Now, this JSON object can be used as the value for `adminSettings`.
For managing **Chrome** via **Google Workspace**, you can use [this apps-script](https://github.com/Landsil/apps_script--GoogleWorkspace-API/blob/master/uBlock_Origin_GSuite_policy.gs) to generate a policy JSON that will modify Trusted Sites for all designated users.
</details>
### Modifying the list of stock assets
You can configure the content of the "Filter lists" tab by providing a custom version of the [`assets.json`](https://github.com/gorhill/uBlock/blob/16a0ebbfb05c4582ecc68454ba3b45b403164dde/assets/assets.json) file.