Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding firefox extension code

I am going through a Firefox extension code. But I am not able to understand how extension code works. Where does it start its execution? Is there a starting point like main() in C?

like image 885
Naman Avatar asked Apr 18 '26 13:04

Naman


1 Answers

There can be multiple situations for an addon to start.

From the top of my head i can remember the following:

  • Toolbar button - The extension only does something when you click it, so you could say that the starting point is the function that the button calls.

  • Context Menu - Same as the , but for context menu item

  • Event triggered start - The extension may be listening to page load / unload, (etc) events and start from there. In this case look for window.addEventListener(...)

like image 148
Filipe Silva Avatar answered Apr 20 '26 02:04

Filipe Silva



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!