diff --git a/src/css/support.css b/src/css/support.css index 8c3afcdc9..8e1b3b7e3 100644 --- a/src/css/support.css +++ b/src/css/support.css @@ -1,3 +1,7 @@ body { margin-bottom: 6rem; } + +.cm-string.cm-property { + color: black; + } diff --git a/src/js/background.js b/src/js/background.js index 112c00e33..cd546ffa0 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -114,6 +114,24 @@ const userSettingsDefault = { webrtcIPAddressHidden: false, }; +const dynamicFilteringDefault = [ + 'behind-the-scene * * noop', + 'behind-the-scene * image noop', + 'behind-the-scene * 3p noop', + 'behind-the-scene * inline-script noop', + 'behind-the-scene * 1p-script noop', + 'behind-the-scene * 3p-script noop', + 'behind-the-scene * 3p-frame noop', +]; + +const hostnameSwitchesDefault = [ + 'no-large-media: behind-the-scene false', +]; +// https://github.com/LiCybora/NanoDefenderFirefox/issues/196 +if ( vAPI.webextFlavor.soup.has('firefox') ) { + hostnameSwitchesDefault.push('no-csp-reports: * true'); +} + const µBlock = { // jshint ignore:line userSettingsDefault: userSettingsDefault, userSettings: Object.assign({}, userSettingsDefault), @@ -122,18 +140,8 @@ const µBlock = { // jshint ignore:line hiddenSettingsAdmin: {}, hiddenSettings: Object.assign({}, hiddenSettingsDefault), - dynamicFilteringDefault: [ - 'behind-the-scene * * noop', - 'behind-the-scene * image noop', - 'behind-the-scene * 3p noop', - 'behind-the-scene * inline-script noop', - 'behind-the-scene * 1p-script noop', - 'behind-the-scene * 3p-script noop', - 'behind-the-scene * 3p-frame noop', - ], - hostnameSwitchesDefault: [ - 'no-large-media: behind-the-scene false', - ], + dynamicFilteringDefault, + hostnameSwitchesDefault, noDashboard: false, diff --git a/src/js/messaging.js b/src/js/messaging.js index bdbc5c901..980f8adb0 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -1304,7 +1304,9 @@ const getSupportData = async function() { return { browserFlavor: Array.from(vAPI.webextFlavor.soup).join(' '), browserVersion: vAPI.webextFlavor.major, - extensionId: vAPI.i18n('@@extension_id'), + extensionId: vAPI.webextFlavor.soup.has('firefox') === false + ? vAPI.i18n('@@extension_id') + : undefined, extensionName: vAPI.app.name, extensionVersion: vAPI.app.version, modifiedUserSettings, diff --git a/src/js/start.js b/src/js/start.js index 3687aa709..7c673e5a6 100644 --- a/src/js/start.js +++ b/src/js/start.js @@ -363,10 +363,6 @@ const createDefaultProps = function() { 'netWhitelist': µb.netWhitelistDefault, 'version': '0.0.0.0' }; - // https://github.com/LiCybora/NanoDefenderFirefox/issues/196 - if ( vAPI.webextFlavor.soup.has('firefox') ) { - fetchableProps.hostnameSwitchesString += '\nno-csp-reports: * true'; - } toFetch(µb.localSettings, fetchableProps); toFetch(µb.restoreBackupSettings, fetchableProps); return fetchableProps; @@ -380,7 +376,7 @@ try { ubolog(`Admin settings ready ${Date.now()-vAPI.T0} ms after launch`); await µb.loadHiddenSettings(); - onHiddenSettingsReady(); + await onHiddenSettingsReady(); ubolog(`Hidden settings ready ${Date.now()-vAPI.T0} ms after launch`); const adminExtra = await vAPI.adminStorage.get('toAdd');