Ryan
Ryan

Reputation: 10039

firefox as addon installed run code

When a user adds our addon to their browser (firefox) as the browser restarts we would like it to run the function whats_new()

Where do we put the code for that?

Or in other words, is there some way I can run whats_new() as my plugin is loaded in Firefox?

Thanks!

Upvotes: 0

Views: 80

Answers (1)

machineghost
machineghost

Reputation: 35730

Short answer:

https://developer.mozilla.org/en/XPCOM/Receiving_startup_notifications

Longer Answer (with history):

https://developer.mozilla.org/en/Observer_Notifications

That URL describes the "app-startup" which I think is exactly what you want ... and it's no longer supported :-(

However, as this URL explains:

https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0#Category_registration

there is now an alternate way of doing something similar, using the "profile-after-change" category.

Upvotes: 1

Related Questions