Skip to content

Commit b9f3523

Browse files
committed
[mv3] Add managed setting to disable first-run page
Related discussion: - uBlockOrigin/uBOL-home#61 Example of usage (chromium/linux): { "3rdparty": { "extensions": { "ddkjiahejlhfcafbddmgiahcphecmpfh": { "disableFirstRunPage": true } } } }
1 parent bc74ea8 commit b9f3523

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

platform/mv3/extension/js/background.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
runtime,
3232
localRead, localWrite,
3333
sessionRead, sessionWrite,
34+
adminRead,
3435
} from './ext.js';
3536

3637
import {
@@ -317,7 +318,10 @@ async function start() {
317318
);
318319

319320
if ( firstRun ) {
320-
runtime.openOptionsPage();
321+
const disableFirstRunPage = await adminRead('disableFirstRunPage');
322+
if ( disableFirstRunPage !== true ) {
323+
runtime.openOptionsPage();
324+
}
321325
}
322326
}
323327

platform/mv3/extension/managed_storage.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"title": "List of domains for which no filtering should occur",
77
"type": "array",
88
"items": { "type": "string" }
9+
},
10+
"disableFirstRunPage": {
11+
"title": "Disable first run page",
12+
"type": "boolean"
913
}
1014
}
1115
}

0 commit comments

Comments
 (0)