mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Improve troubleshooting information
This commit is contained in:
parent
4f41880e43
commit
1c7b7e435e
2 changed files with 9 additions and 0 deletions
|
|
@ -337,6 +337,12 @@ function onMessage(request, sender, callback) {
|
|||
});
|
||||
return true;
|
||||
|
||||
case 'hasBroadHostPermissions':
|
||||
hasBroadHostPermissions().then(result => {
|
||||
callback(result);
|
||||
});
|
||||
return true;
|
||||
|
||||
case 'setAutoReload':
|
||||
rulesetConfig.autoReload = request.state && true || false;
|
||||
saveRulesetConfig().then(( ) => {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ export async function getTroubleshootingInfo(siteMode) {
|
|||
defaultMode,
|
||||
userRules,
|
||||
consoleOutput,
|
||||
hasOmnipotence,
|
||||
] = await Promise.all([
|
||||
runtime.getPlatformInfo(),
|
||||
sendMessage({ what: 'getDefaultConfig' }),
|
||||
|
|
@ -65,6 +66,7 @@ export async function getTroubleshootingInfo(siteMode) {
|
|||
sendMessage({ what: 'getDefaultFilteringMode' }),
|
||||
sendMessage({ what: 'getEffectiveUserRules' }),
|
||||
sendMessage({ what: 'getConsoleOutput' }),
|
||||
sendMessage({ what: 'hasBroadHostPermissions' }),
|
||||
]);
|
||||
const browser = (( ) => {
|
||||
const extURL = runtime.getURL('');
|
||||
|
|
@ -103,6 +105,7 @@ export async function getTroubleshootingInfo(siteMode) {
|
|||
version: manifest.version,
|
||||
browser,
|
||||
filtering,
|
||||
permission: hasOmnipotence ? 'all' : 'ask',
|
||||
};
|
||||
if ( userRules.length !== 0 ) {
|
||||
config['user rules'] = userRules.length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue