Skip to content

Commit

Permalink
fix context menu (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrusch authored Oct 8, 2021
1 parent 44c233b commit c62d7fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/background/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export default class ContextMenu {
*/
constructor() {
const {ContextMenuOptions} = AppConfig;
const {browser_action} = chrome.runtime.getManifest();

chrome.contextMenus.removeAll(() => {
Object.keys(ContextMenuOptions).map(key => {
chrome.contextMenus.create({
title: ContextMenuOptions[key].title,
contexts: ['action'],
contexts: [browser_action ? 'browser_action' : 'action'],
parentId: ContextMenuOptions[key].parentId,
id: ContextMenuOptions[key].id || key
});
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const AppConfig = {
ww: 700, wh: 800,
url: 'https://www.pinterest.com/pin/create/button/?url={URI}&media=' +
'https://raw.githubusercontent.com/MobileFirstLLC/shortcuts-for-chrome/' +
'68bf15ddb9f263b058a10340202ac775f0f4cf8d/assets/preview.gif'
'44c233bc8ad8515c3e89303e9465a520142ad9de/assets/preview.gif'
}
}
};

0 comments on commit c62d7fc

Please sign in to comment.