I have a very simple script that I would like to execute automatically when Firefox exits.
Is this somehow possible ?
Execute Script on Firefox Exit
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: Execute Script on Firefox Exit
Do you want to use an XPCOM interface in a script?
XPCOM Interface Reference
http://developer.mozilla.org/en-US/docs ... /Interface
Someone in a german forum got the userChromeJS extension working in Firefox 57.
userChromeJS
http://userchromejs.mozdev.org/
More info: http://forums.mozillazine.org/viewtopic ... #p14747866
It's easier to run a script at startup, then at shutdown.
XPCOM Interface Reference
http://developer.mozilla.org/en-US/docs ... /Interface
Someone in a german forum got the userChromeJS extension working in Firefox 57.
userChromeJS
http://userchromejs.mozdev.org/
More info: http://forums.mozillazine.org/viewtopic ... #p14747866
It's easier to run a script at startup, then at shutdown.
-
- Posts: 17
- Joined: November 6th, 2017, 8:03 am
Re: Execute Script on Firefox Exit
....... thanks for your reply.
I'm running the script at startup now and it's working fine.
The script just replaces the webappsstore.sqlite with a saved copy of mine.
It's because my Privacy & Security settings are for cookies:
Keep until I close Firefox and Clear history when Firefox closes with all settings checked.
With this the saved settings for an installed add-on reverted back to default on the next start of Firefox.
Still I would like to execute this script when Firefox exits, because now if links in e-mails for example are clicked, Firefox starts normal without using my script.
Hopefully I will find a solution to this sooner or later, as this is a privacy issue that bugs me.
My knowledge and time is too limited to get this done with XPCOM or userChromeJS, but I'll check it out again when I find the time.
Thanks again for your help .......
I'm running the script at startup now and it's working fine.
The script just replaces the webappsstore.sqlite with a saved copy of mine.
It's because my Privacy & Security settings are for cookies:
Keep until I close Firefox and Clear history when Firefox closes with all settings checked.
With this the saved settings for an installed add-on reverted back to default on the next start of Firefox.
Still I would like to execute this script when Firefox exits, because now if links in e-mails for example are clicked, Firefox starts normal without using my script.
Hopefully I will find a solution to this sooner or later, as this is a privacy issue that bugs me.
My knowledge and time is too limited to get this done with XPCOM or userChromeJS, but I'll check it out again when I find the time.
Thanks again for your help .......
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: Execute Script on Firefox Exit
I heard the topic is difficult.tommygun wrote:I'll check it out again when I find the time.
More infoLithopsian wrote:Accessing local storage from an addon is a nightmare.
http://discourse.mozilla.org/t/8000
Reference
http://dxr.mozilla.org/mozilla-release/ ... ncipal.idl
http://dxr.mozilla.org/mozilla-release/ ... anager.idl
http://dxr.mozilla.org/mozilla-release/ ... anager.idl