diff --git a/app/common/constants/settingsEnums.js b/app/common/constants/settingsEnums.js index 0b6dcc61961..86b70e8decb 100644 --- a/app/common/constants/settingsEnums.js +++ b/app/common/constants/settingsEnums.js @@ -21,6 +21,12 @@ const bookmarksToolbarMode = { FAVICONS_ONLY: 'faviconsOnly' } +const tabPreviewTiming = { + LONG: 2000, + NORMAL: 1000, + SHORT: 500 +} + const tabCloseAction = { LAST_ACTIVE: 'lastActive', NEXT: 'next', @@ -41,6 +47,7 @@ module.exports = { startsWithOption, newTabMode, bookmarksToolbarMode, + tabPreviewTiming, tabCloseAction, fullscreenOption, autoplayOption diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index bd33d411ca7..65b8f40a44a 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -380,3 +380,7 @@ urlBarOptions=URL Bar Options disableTitleMode=Always show the URL bar wideURLbar=Use wide URL bar autoplay=Autoplay Media +tabPreviewTiming=Time to wait before previewing a tab +long=Long +normal=Normal +short=Short diff --git a/app/renderer/components/preferences/tabsTab.js b/app/renderer/components/preferences/tabsTab.js index b8663d469ff..b4959a32f7f 100644 --- a/app/renderer/components/preferences/tabsTab.js +++ b/app/renderer/components/preferences/tabsTab.js @@ -10,7 +10,7 @@ const {SettingsList, SettingItem, SettingCheckbox} = require('../common/settings const {SettingDropdown} = require('../common/dropdown') -const {tabCloseAction} = require('../../../common/constants/settingsEnums') +const {tabCloseAction, tabPreviewTiming} = require('../../../common/constants/settingsEnums') const {changeSetting} = require('../../lib/settingsUtil') const getSetting = require('../../../../js/settings').getSetting const settings = require('../../../../js/constants/settings') @@ -36,6 +36,22 @@ class TabsTab extends ImmutableComponent { } ] } + get tabPreviewTimingOptions () { + return [ + { + id: 'long', + action: tabPreviewTiming.LONG + }, + { + id: 'normal', + action: tabPreviewTiming.NORMAL + }, + { + id: 'short', + action: tabPreviewTiming.SHORT + } + ] + } render () { return (