Changes

Jump to: navigation, search
The 'How': the extension's code
We need to wire our code to a number of events by [http://developer.mozilla.org/en/docs/XUL_Event_Propagation#Adding_an_Event_Listener adding event listeners]. Two of the events we know already, '''TabOpen''' and '''TabSelect'''. However, we also need to have the code to accomplish this get called in a sort of global event listener, the '''window's load event'''. We'll add code to remove our event listeners in the '''window's unload event''' too.
 
==overlay.js==
To keep things clean we'll write all this code in a custom object called '''AddTabBeside'''. Here is '''AddTabBeside''':
// Insure that our code gets loaded at start-up
window.addEventListener("load", function(e) { AddTabBeside.onLoad(e); }, false);
 
We'll save this code in a file named '''overlay.js''' in order to reflect the fact that we're writing an overlay that will be merged with the browser at runtime. But where do we put this file? Firefox needs to know where it is in order to load and run it at startup. For this to work we have to do some things to create an installable package to wrap around our code.
 
==Creating the rest of the extension==
 
==Success, and some bugs==
 
=Reflections=

Navigation menu