userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

New context menu architecture design

Open ACTCD opened this issue 2 years ago • 0 comments

The current @run-at content-menu is an undocumented design.

It is currently registered with all contexts and only uses a limited browser.menus.ACTION_MENU_TOP_LEVEL_LIMIT. It leads to lack of scalability, and less suitable use cases.

The top level menu should be reserved more for the functionality of the extension itself. Most registry items generated by user script should use the secondary menu.

Also, we should register different usage scenarios to different contexts, not to all contexts. Registration timing and persistence should also be considerations.

Note that the context menu should not be used as a direct replacement for GM.registerMenuCommand, it should be reimplemented in popup. Ref:#230

ACTCD avatar Mar 20 '23 05:03 ACTCD