Created
January 19, 2016 15:18
-
-
Save freaktechnik/e0eb57b08a5c18ae9eb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const tabs = require("sdk/tabs"); | |
| var optionsTab; | |
| function OptionsPanel(){ | |
| if(optionsTab == null){ | |
| tabs.once("open", (tab) => { | |
| optionsTab = tab; | |
| optionsTab.once("close", () => { | |
| optionsTab = null; | |
| }); | |
| }); | |
| tabs.open( data.url("OptionsPanel.html") ); | |
| }else{ | |
| optionsTab.activate(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment