Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 8d369b0

Browse files
authored
Merge pull request #5335 from bsclifton/default-to-newtab
Removed "blank" option (about:blank !== about:newtab)
2 parents d7d2718 + 96492aa commit 8d369b0

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

app/common/constants/settingsEnums.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const startsWithOption = {
99
}
1010

1111
const newTabMode = {
12-
BLANK: 'blank',
1312
NEW_TAB_PAGE: 'newTabPage',
1413
HOMEPAGE: 'homePage',
1514
DEFAULT_SEARCH_ENGINE: 'defaultSearchEngine'

docs/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ AppStore
161161
// See defaults in js/constants/appConfig.js
162162
'general.startup-mode': string, // One of: lastTime, homePage, newTabPage
163163
'general.homepage': string, // URL of the user's homepage
164-
'general.newtab-mode-TEMP': string, // One of: blank, newTabPage, homePage, defaultSearchEngine
164+
'general.newtab-mode': string, // One of: newTabPage, homePage, defaultSearchEngine
165165
'general.show-home-button': boolean, // true if the home button should be shown
166166
'general.useragent.value': (undefined|string), // custom user agent value
167167
'general.downloads.default-save-path': string, // default path for saving files

js/about/preferences.js

-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ class GeneralTab extends ImmutableComponent {
655655
<SettingItem dataL10nId='newTabMode'>
656656
<select value={getSetting(settings.NEWTAB_MODE, this.props.settings)}
657657
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.NEWTAB_MODE)} >
658-
<option data-l10n-id='newTabBlank' value={newTabMode.BLANK} />
659658
<option data-l10n-id='newTabNewTabPage' value={newTabMode.NEW_TAB_PAGE} />
660659
<option data-l10n-id='newTabHomePage' value={newTabMode.HOMEPAGE} />
661660
<option data-l10n-id='newTabDefaultSearchEngine' value={newTabMode.DEFAULT_SEARCH_ENGINE} />

js/constants/appConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module.exports = {
9999
'general.language': null, // null means to use the OS lang
100100
'general.startup-mode': 'lastTime',
101101
'general.homepage': 'https://www.brave.com',
102-
'general.newtab-mode-TEMP': process.env.NODE_ENV === 'test' ? 'newTabPage' : 'blank',
102+
'general.newtab-mode': 'newTabPage',
103103
'general.show-home-button': false,
104104
'general.useragent.value': null, // Set at runtime
105105
'general.autohide-menu': true,

js/constants/settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const settings = {
66
// General tab
77
STARTUP_MODE: 'general.startup-mode',
88
HOMEPAGE: 'general.homepage',
9-
NEWTAB_MODE: 'general.newtab-mode-TEMP',
9+
NEWTAB_MODE: 'general.newtab-mode',
1010
SHOW_HOME_BUTTON: 'general.show-home-button',
1111
USERAGENT: 'general.useragent.value',
1212
DEFAULT_DOWNLOAD_SAVE_PATH: 'general.downloads.default-save-path',

js/lib/appUrlUtil.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,8 @@ module.exports.newFrameUrl = function () {
159159
const {newTabMode} = require('../../app/common/constants/settingsEnums')
160160

161161
switch (settingValue) {
162-
case newTabMode.NEW_TAB_PAGE:
163-
return 'about:newtab'
164-
165162
case newTabMode.HOMEPAGE:
166-
return getSetting(settings.HOMEPAGE) || 'about:blank'
163+
return getSetting(settings.HOMEPAGE) || 'about:newtab'
167164

168165
case newTabMode.DEFAULT_SEARCH_ENGINE:
169166
const searchProviders = require('../data/searchProviders').providers
@@ -173,7 +170,8 @@ module.exports.newFrameUrl = function () {
173170
})
174171
return defaultSearchEngineSettings[0].base
175172

173+
case newTabMode.NEW_TAB_PAGE:
176174
default:
177-
return 'about:blank'
175+
return 'about:newtab'
178176
}
179177
}

0 commit comments

Comments
 (0)