mirror of
https://github.com/bitwarden/browser
synced 2024-12-26 18:04:07 +01:00
define top-level (root) context menu item.
This commit is contained in:
parent
8c4abf81de
commit
f83d8b6484
@ -90,31 +90,42 @@ if (chrome.runtime.onInstalled) {
|
||||
|
||||
function buildContextMenu(callback) {
|
||||
chrome.contextMenus.removeAll(function () {
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'root',
|
||||
contexts: ['all'],
|
||||
title: 'bitwarden'
|
||||
}, function () {
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'autofill',
|
||||
parentId: 'root',
|
||||
contexts: ['all'],
|
||||
title: i18nService.autoFill
|
||||
}, function () {
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'copy-username',
|
||||
parentId: 'root',
|
||||
contexts: ['all'],
|
||||
title: i18nService.copyUsername
|
||||
}, function () {
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'copy-password',
|
||||
parentId: 'root',
|
||||
contexts: ['all'],
|
||||
title: i18nService.copyPassword
|
||||
}, function () {
|
||||
chrome.contextMenus.create({
|
||||
type: 'separator'
|
||||
type: 'separator',
|
||||
parentId: 'root'
|
||||
});
|
||||
|
||||
chrome.contextMenus.create({
|
||||
type: 'normal',
|
||||
id: 'generate-password',
|
||||
parentId: 'root',
|
||||
contexts: ['all'],
|
||||
title: i18nService.generatePasswordCopied
|
||||
}, function () {
|
||||
@ -126,6 +137,7 @@ function buildContextMenu(callback) {
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
chrome.tabs.onActivated.addListener(function (activeInfo) {
|
||||
|
Loading…
Reference in New Issue
Block a user