[mv3] Add managed setting to disable first-run page

Related discussion:
- https://github.com/uBlockOrigin/uBOL-issues/discussions/61

Example of usage (chromium/linux):

    {
      "3rdparty": {
        "extensions": {
          "ddkjiahejlhfcafbddmgiahcphecmpfh": {
            "disableFirstRunPage": true
          }
        }
      }
    }
This commit is contained in:
Raymond Hill 2023-07-29 09:33:24 -04:00
parent bc74ea82af
commit b9f3523c95
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 9 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import {
runtime,
localRead, localWrite,
sessionRead, sessionWrite,
adminRead,
} from './ext.js';
import {
@ -317,7 +318,10 @@ async function start() {
);
if ( firstRun ) {
runtime.openOptionsPage();
const disableFirstRunPage = await adminRead('disableFirstRunPage');
if ( disableFirstRunPage !== true ) {
runtime.openOptionsPage();
}
}
}

View File

@ -6,6 +6,10 @@
"title": "List of domains for which no filtering should occur",
"type": "array",
"items": { "type": "string" }
},
"disableFirstRunPage": {
"title": "Disable first run page",
"type": "boolean"
}
}
}