-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Context Menus update process #2050
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also mark the build method as private
for (const [option, entry] of Object.entries(ContextMenu.queryLinks)) { | ||
let [locale, query_, enabled] = entry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const [option, entry] of Object.entries(ContextMenu.queryLinks)) { | |
let [locale, query_, enabled] = entry; | |
for (const [id, menuItem] of Object.entries(ContextMenu.queryLinks)) { | |
const [locale, query_, enabled] = menuItem; |
@@ -83,28 +94,29 @@ export default class ContextMenu { | |||
|
|||
for (const [option, entry] of Object.entries(ContextMenu.queryLinks)) { | |||
let [locale, query_, enabled] = entry; | |||
if (!enabled()) { | |||
continue | |||
} | |||
|
|||
browser.contextMenus.create({ | |||
id: option, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: option, | |
id, |
No description provided.