Skip to content
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

Duplicate IDs error #6

Closed
Dioscorides opened this issue Jul 20, 2022 · 1 comment · Fixed by #10
Closed

Duplicate IDs error #6

Dioscorides opened this issue Jul 20, 2022 · 1 comment · Fixed by #10
Labels
bug Something isn't working

Comments

@Dioscorides
Copy link
Member

When opening the plugin's popup.html, the console outputs an error mentioning duplicate IDs. This is because options.js repeatedly calls the "context menu" options, every time the popup is opened by the user.

  1. Move the context menu options from options.js to a new file called background.js.
  2. in manifest.json, call background.js instead of popup.html in the "background" section of the json.
@Dioscorides Dioscorides added the bug Something isn't working label Jul 20, 2022
@bencomp
Copy link
Member

bencomp commented Jul 20, 2022

That looks sensible – the background scripts are run when the addon is loaded, so that is where you want to initialise context menus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants