Skip to content

Commit

Permalink
[mv3] Add managed setting to disable first-run page
Browse files Browse the repository at this point in the history
Related discussion:
- uBlockOrigin/uBOL-home#61

Example of usage (chromium/linux):

    {
      "3rdparty": {
        "extensions": {
          "ddkjiahejlhfcafbddmgiahcphecmpfh": {
            "disableFirstRunPage": true
          }
        }
      }
    }
  • Loading branch information
gorhill committed Jul 29, 2023
1 parent bc74ea8 commit b9f3523
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platform/mv3/extension/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
runtime,
localRead, localWrite,
sessionRead, sessionWrite,
adminRead,
} from './ext.js';

import {
Expand Down Expand Up @@ -317,7 +318,10 @@ async function start() {
);

if ( firstRun ) {
runtime.openOptionsPage();
const disableFirstRunPage = await adminRead('disableFirstRunPage');
if ( disableFirstRunPage !== true ) {
runtime.openOptionsPage();
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions platform/mv3/extension/managed_storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

0 comments on commit b9f3523

Please sign in to comment.