Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a Firefox extension (add-on) that only becomes available for a specific site?

I want to develop an extension that activates only for a specific domain.
I don't want it to appear in browser menus while not browsing this specific domain.

Is it possible to do that?

like image 779
ronik Avatar asked Dec 14 '25 02:12

ronik


1 Answers

Possible: for the menus you could add a popupshowing listener that checks the currently loaded URL (docs for the context menu, where this would make the most sense).

You can also update always visible elements (like status bar icons) whenever the currently displayed URL is changed. This is done via gBrowser.addEventListener.

like image 164
Nickolay Avatar answered Dec 16 '25 22:12

Nickolay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!