Changes

Jump to: navigation, search
m
addtabbeside/
This code now needs to get merged into the browser so it can access elements within the application. We do this by providing a [http://developer.mozilla.org/en/docs/XUL_Overlays XUL Overlay] file. A XUL Overlay is a .xul file that specifies XUL fragments to insert at specific merge points within a "master" document. Often this is used to add new UI to an application (e.g., a new menu item), but in our case we'll use it to merge our addtabbeside.js script into the browser.
We need to create '''addtabbdeside/chrome/content/overlay.xul''':
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<overlay id="addtabbeside-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="addtabbeside.js"/>
</overlay>
</pre>
Having added our script and overlay files, we now need to add a couple of metadata files to help Firefox understand and install/load our extension.
The first is '''addtabbeside/contentchrome.manifest''', which is a [http://developer.mozilla.org/en/docs/Chrome_Manifest Chrome Manifest]. This file helps Firefox translate between chrome:// URIs and actual files on disk. It also allows us to specify where our overlay will be merged into the browser:
# Chrome package addtabbeside has it's content in ./chrome/content
<pre>
<?xml version="1.0" encoding="UTF-8"?> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
<em:minVersion>2.0</em:minVersion>
<!--<em:maxVersion>3.0a9pre</em:maxVersion>--> <!-- trunk build Oct 14, 2007 --> <em:maxVersion>3.0+</em:maxVersion> <!-- work for v3.0 and above -->
</Description>
</em:targetApplication>
</Description>
</RDF>
</pre>
C:\Documents and Settings\''Username''\Application Data\Mozilla\Firefox\Profiles\''dev-profile''\extensions\addtabbeside@senecac.on.ca
 
Or in Mac OSX
 
~/Library/Application Support/Firefox/Profiles/
This file should contain a single line of text--the full path to your extension, for example:

Navigation menu