bradcush / mark-tab-manager

Mark is a minimalist tab manager in the form of a browser extension that organizes tabs as you browse. With Mark, tabs are automatically grouped by domain and sorted alphabetically.
Apache License 2.0
16 stars 3 forks source link

fix(menus): remove all menus before creation on startup #253

Closed bradcush closed 1 year ago

bradcush commented 1 year ago

Closes #227 and closes #161

bradcush commented 1 year ago

Adding menu creation to onStartup hook will create menus when the browser is quit and opened again. It was observed that quitting the browser and re-opening when a browser update did not occur clears the context menus but doesn't fire the onInstalled event. There may be cases where onStartup and onInstalled conflict, such as when a browser update happens. For now we've kept it simple as conflicts will likely trigger exceptions but not necessarily result in menu creation issues. Later it's advised to create a mechanism for only allowing one creation at a time and forgetting others.