aminomancer / uc.css.js

A dark indigo CSS theme for Firefox and a large collection of privileged scripts to add new buttons, menus, and behaviors and eliminate nuisances. The theme is similar to other userChrome stylesheets, but it's intended for use with an autoconfig loader like fx-autoconfig, since it uses JavaScript to implement its more functional features.
Other
329 stars 27 forks source link

debugExtensionInToolbarContextMenu.uc.js #13

Closed bege10 closed 2 years ago

bege10 commented 2 years ago

Hello, I use some of your helpful scripts, thank you. Is it possible to add the menu of debugExtensionInToolbarContextMenu.uc.js also to the context menu of the addons in about:addons?

aminomancer commented 2 years ago

Not feasible, sorry. about:addons is a content page. It doesn't have its own context menu. All content pages use one context menu. The menuitems just get hidden/shown depending on what was clicked. It's very different from the toolbar context menu that opens when you right click an addon's toolbar button.

edit: To be clear, in case anyone else is thinking of trying this, it's entirely possible, it's just way more work than most of my scripts, and might require multiple files. I try to make all my scripts standalone unless they're very important, or part of the theme.

To do this you'd need to either 1) use the component registrar to replace existing scripts/content on the aboutAddons page, to create a fake context menu in-content, or otherwise escalate the principal or set up some parent connection so you can associate it with a "real" context menu in the parent window;

or 2) use the component registrar to add a new about:addons page that does all those things. However I don't know if it's possible to unregister an existing about URL, so that might require a new URL like about:extensions.

Overall it just seems like a huge amount of work and baggage for something relatively insignificant. I think I'd rather spend my time making the debug context menu script also create a context menu for the "extension options panel" script.

bege10 commented 2 years ago

Thanks for your answer.