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 #7881 from brave/cmd-click-home-newtab
Browse files Browse the repository at this point in the history
Adds Ctrl-Click to Home Button
  • Loading branch information
bsclifton authored Apr 3, 2017
2 parents 67a0eaa + 9422f0d commit e6336e4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/components/navigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ class NavigationBar extends ImmutableComponent {
contextMenus.onReloadContextMenu(target)
}

onHome () {
onHome (e) {
getSetting(settings.HOMEPAGE).split('|')
.forEach((homepage, i) => {
ipc.emit(i === 0 ? messages.SHORTCUT_ACTIVE_FRAME_LOAD_URL : messages.SHORTCUT_NEW_FRAME, {}, homepage)
ipc.emit(i === 0 && !eventUtil.isForSecondaryAction(e)
? messages.SHORTCUT_ACTIVE_FRAME_LOAD_URL
: messages.SHORTCUT_NEW_FRAME,
{}, homepage)
})
}

Expand Down

0 comments on commit e6336e4

Please sign in to comment.