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

Commit

Permalink
Move clone tab to tab context menu
Browse files Browse the repository at this point in the history
Auditors: @bridiver
  • Loading branch information
bbondy committed Jul 26, 2016
1 parent e218f81 commit d9bf739
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/en-US/menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ editBookmark=Edit Bookmark...
deleteFolder=Delete Folder
deleteBookmark=Delete Bookmark
stop=Stop
cloneTab=Clone Tab
clone=Clone
reloadTab=Reload
unpinTab=Unpin
pinTab=Pin
Expand Down
2 changes: 1 addition & 1 deletion app/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var rendererIdentifiers = function () {
'reloadTab',
'cleanReload',
'reload',
'cloneTab',
'clone',
'readingView',
'tabManager',
'textEncoding',
Expand Down
16 changes: 7 additions & 9 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ function tabTemplateInit (frameProps) {
focusedWindow.webContents.send(messages.SHORTCUT_FRAME_RELOAD, tabKey)
}
}
}, {
label: locale.translation('clone'),
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_CLONE)
}
}
})

if (!frameProps.get('isPrivate')) {
Expand Down Expand Up @@ -858,15 +865,6 @@ function mainTemplateInit (nodeProps, frame) {
}
}
},
{
label: locale.translation('cloneTab'),
click: (item, focusedWindow) => {
if (focusedWindow) {
focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_CLONE)
}
}
},

CommonMenu.separatorMenuItem,
addBookmarkMenuItem('bookmarkPage', siteUtil.getDetailFromFrame(frame, siteTags.BOOKMARK), false), {
label: locale.translation('find'),
Expand Down

0 comments on commit d9bf739

Please sign in to comment.