how to quit firefox by using extensions quit firefox

76 views Asked by At

I'm not familiar with firefox extensions.Now I want to write an extension to quit firefox. How to quit firefox by using extensions?Could someone help me?Thanks!

1

There are 1 answers

0
Filipe Silva On

You may find help on this reference page:

If you want to forcequit everytime you can do:

var appStartup = Components.classes['@mozilla.org/toolkit/app-startup;1'].
 getService(Components.interfaces.nsIAppStartup);

appStartup.quit(Components.interfaces.nsIAppStartup.eForceQuit);