mirror of https://github.com/gorhill/uBlock.git
[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:
parent
bc74ea82af
commit
b9f3523c95
|
@ -31,6 +31,7 @@ import {
|
||||||
runtime,
|
runtime,
|
||||||
localRead, localWrite,
|
localRead, localWrite,
|
||||||
sessionRead, sessionWrite,
|
sessionRead, sessionWrite,
|
||||||
|
adminRead,
|
||||||
} from './ext.js';
|
} from './ext.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -317,9 +318,12 @@ async function start() {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( firstRun ) {
|
if ( firstRun ) {
|
||||||
|
const disableFirstRunPage = await adminRead('disableFirstRunPage');
|
||||||
|
if ( disableFirstRunPage !== true ) {
|
||||||
runtime.openOptionsPage();
|
runtime.openOptionsPage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
start();
|
start();
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
"title": "List of domains for which no filtering should occur",
|
"title": "List of domains for which no filtering should occur",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "type": "string" }
|
"items": { "type": "string" }
|
||||||
|
},
|
||||||
|
"disableFirstRunPage": {
|
||||||
|
"title": "Disable first run page",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue