diff --git a/src/js/storage.js b/src/js/storage.js index 4d29fc85d6454..8fd3eb0c5676b 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -208,7 +208,7 @@ import { hsDefault[name] = hsAdmin[name] = hsUser[name] = value; } } - µb.noDashboard = disableDashboard === true; + µb.noDashboard = disableDashboard == true; if ( Array.isArray(disabledPopupPanelParts) ) { const partNameToBit = new Map([ [ 'globalStats', 0b00010 ], diff --git a/tools/GroupPolicy/en-US/uBlock.adml b/tools/GroupPolicy/en-US/uBlock.adml new file mode 100644 index 0000000000000..2defb1c612fc9 --- /dev/null +++ b/tools/GroupPolicy/en-US/uBlock.adml @@ -0,0 +1,142 @@ + + + Contoso Company base file + This file contains the Contoso parent category. + + + + uBlock Origin v1.0.0.1 or later + uBlock Origin v1.3.2 or later + uBlock Origin v1.33.0 or later + uBlock Origin + Google Chrome + Microsoft Edge + Mozilla Firefox + Apply an exported configuration (adminSettings) + Advanced settings to overwrite + User settings to overwrite + Prevent access to uBO's dashboard + Popup panel parts to disable + Settings to add at launch time + Settings to overwrite at launch time + A valid JSON string compliant with uBO's backup format. + +Administrators can force specific configurations to deployed 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. + +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 which will be overwritten on the user's side. + +Example value: +{"userSettings": {"colorBlindFriendly": true}} + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin + + A list of [name,value] pairs to populate user settings + +Each entry in the array is an array consisting of a pair of name-value strings. Each name string must be a supported user setting, and each value string must properly resolve to a supported value. + +Every valid entry will be used to overwrite the corresponding default user setting at launch time. + +Example value: +[[ "contextMenuEnabled", "false" ],[ "dynamicFilteringEnabled", "false" ]] + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#usersettings + A list of [name,value] pairs to populate advanced settings + +Each entry in the array is an array consisting of a pair of name-value strings. Each name string must be a supported advanced setting, and each value string must properly resolve to a supported value. + +Every valid entry will be used to overwrite the corresponding default advanced setting, and will also become read-only, i.e. the user won't be able to change it. + +Example value: +[[ "disableWebAssembly", "true" ]] + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#advancedsettings + Set to true to prevent access to configuration options + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#disabledashboard + An array of strings, where each string refer to a part of the popup panel which should be removed from view. Current supported named parts: + +globalStats: remove access to "Blocked since install" statistic. +basicTools: remove access to basic tools. +extraTools: remove access to per-site switches. +overviewPane: remove access to the overview pane. + +Example value: +["globalStats","overviewPane"] + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#disabledpopuppanelparts + The properties in the toAdd branch will append to the already present local settings. Currently, the following properties are supported: + +trustedSiteDirectives +The trustedSiteDirectives property is an array of string, each of which must resolve into a valid trusted-site directive, used to dictate where uBO must be disabled. + +Example value: +{"trustedSiteDirectives": ["example.com","example.org"]} + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#toadd + The properties in the toOverwrite branch will wholly replace the corresponding local settings. Currently, the following properties are supported: + +filters +The filters property is an array of strings, which are meant to represent all the lines making the text to use as the content of the "My filters" pane. + +filterLists +The filterLists property is an array of strings, where each string is a token which identifies a list to enable by default. To enable a stock filter list, this is the token identifying the list as per content of assets.json. For an external list, i.e. not found in assets.json, the token is the URL of the filter list. + +trustedSiteDirectives +The trustedSiteDirectives property is an array of string, each of which must resolve into a valid trusted-site directive, used to dictate where uBO must be disabled. + +All the directives will be used to wholly replace the local trusted-site directives, including the built-in ones. + +Example value: +{"trustedSiteDirectives": ["example.com","example.org"], "filters": ["||example.com/log$xhr,domain=www.example.org"], "filterLists": ["ublock-filters"]} + +https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#tooverwrite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/GroupPolicy/uBlock.admx b/tools/GroupPolicy/uBlock.admx new file mode 100644 index 0000000000000..38f62d036ef03 --- /dev/null +++ b/tools/GroupPolicy/uBlock.admx @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +