Only Firefox extension code runs once per session

I am creating a Firefox extension that requires a user to log in. Each time a new window is opened, but not a new tab, "code" for the extension is launched. I would prefer the code to run only once per session.

The extension setting looks like this. (let me know if I missed something):

in chrome manifest: overlay chrome://browser/content/browser.xul chrome://my/overlay.xul

in overlay.xul:
<overlay id="socialSidebarOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://my/code.js" />
</overlay>

in code.js:
alert('being called')

The problem is that the “call” should only appear when Firefox starts, and not when opening new tabs or windows. What would be for this?

+5
source share
2 answers
+3

, ( ) Mozilla

- , reset [ , reset].

. :

+1

All Articles