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

Commit

Permalink
Merge pull request #5831 from GreenRecycleBin/feature/open-bookmarks-…
Browse files Browse the repository at this point in the history
…in-new-foreground-tabs

Open bookmarks in new foreground tabs
  • Loading branch information
bsclifton authored Nov 26, 2016
2 parents 1726e9c + 87d9bf2 commit 80e27e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/actions/bookmarkActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
const siteUtil = require('../state/siteUtil')
const windowActions = require('./windowActions')
const eventUtil = require('../lib/eventUtil')
const {SWITCH_TO_NEW_TABS} = require('../constants/settings')
const getSetting = require('../settings').getSetting

const bookmarkActions = {
openBookmarksInFolder: function (allBookmarkItems, folderDetail) {
Expand All @@ -17,7 +19,7 @@ const bookmarkActions = {
// Only load the first 25 tabs as loaded
bookmarks
.forEach((bookmark, i) =>
windowActions.newFrame(Object.assign(siteUtil.toFrameOpts(bookmark), {unloaded: i > 25}), false))
windowActions.newFrame(Object.assign(siteUtil.toFrameOpts(bookmark), {unloaded: i > 25}), getSetting(SWITCH_TO_NEW_TABS)))
},

/**
Expand All @@ -31,7 +33,7 @@ const bookmarkActions = {
windowActions.newFrame({
location: bookmarkItem.get('location'),
partitionNumber: bookmarkItem && bookmarkItem.get && bookmarkItem.get('partitionNumber') || undefined
}, !!e.shiftKey)
}, !!e.shiftKey || getSetting(SWITCH_TO_NEW_TABS))
} else {
windowActions.loadUrl(activeFrame, bookmarkItem.get('location'))
}
Expand Down

0 comments on commit 80e27e1

Please sign in to comment.