diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 73ac36749..2a96f71a3 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -387,11 +387,11 @@ vAPI.Tabs = class { // Properties of the details object: // - url: 'URL', => the address that will be opened - // - index: -1, => undefined: end of the list, -1: following tab, or - // after index - // - active: false, => opens the tab in background - true and undefined: - // foreground - // - popup: true => open in a new window + // - index: -1, => undefined: end of the list, -1: following tab, + // or after index + // - active: false, => opens the tab... in background: true, + // foreground: undefined + // - popup: 'popup' => open in a new window create(url, details) { if ( details.active === undefined ) { @@ -443,10 +443,10 @@ vAPI.Tabs = class { // For some reasons, some platforms do not honor the left,top // position when specified. I found that further calling // windows.update again with the same position _may_ help. - if ( details.popup === true && browser.windows instanceof Object ) { + if ( details.popup !== undefined && browser.windows instanceof Object ) { const createDetails = { url: details.url, - type: 'popup', + type: details.popup, }; if ( details.box instanceof Object ) { Object.assign(createDetails, details.box); diff --git a/src/js/background.js b/src/js/background.js index 76c531047..172abec10 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -52,6 +52,7 @@ const µBlock = (function() { // jshint ignore:line disableWebAssembly: false, ignoreRedirectFilters: false, ignoreScriptInjectFilters: false, + loggerPopupType: 'popup', manualUpdateAssetFetchPeriod: 500, popupFontSize: 'unset', requestJournalProcessPeriod: 1000, diff --git a/src/js/utils.js b/src/js/utils.js index ee04159d7..5c7a9a6fc 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -386,8 +386,8 @@ !this.userSettings.alwaysDetachLogger ); } - details.popup = this.userSettings.alwaysDetachLogger; - if ( details.popup ) { + if ( this.userSettings.alwaysDetachLogger ) { + details.popup = this.hiddenSettings.loggerPopupType; const url = new URL(vAPI.getURL(details.url)); url.searchParams.set('popup', '1'); details.url = url.href;