610 likes | 729 Views
The Right Tools For The Right Job Building Add-ons for Firefox and Fennec. Mark Phillip markphillip.com. I've never created a Firefox add-on because. “. I've never created a Firefox add-on because I've been able to do most things I want to do using Greasemonkey / User Scripts. ”. “.
E N D
The Right Tools For The Right Job Building Add-ons for Firefox and Fennec Mark Phillip markphillip.com
“ I've never created a Firefox add-on because I've been able to do most things I want to do using Greasemonkey / User Scripts. ”
“ I've never created a Firefox add-on because I've never needed to. ”
“ Never created a ff addon because the iPhone API is way too distracting. ”
1.5M Downloads/Day 192M In Use
1.5M Downloads/Day 192M In Use 1/3 of users have 1+
1.5M Downloads/Day 192M In Use 1/3 of users have 1+ 1.6B Downloads
AdBlock Plus Firebug Flagfox Download Statusbar SkipScreen
“ I've never created a Firefox add-on because I'm not a programmer. ”
XUL XML User Interface Language
install.rdf chrome.manifest main.xul
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>3.5.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>3.5.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>3.5.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>3.5.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.5</em:minVersion> <em:maxVersion>3.5.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Thunderbird --> <em:targetApplication> <Description> <em:id>{a463f10c-3994-11da-9945-000d60ca027b}</em:id> <em:minVersion>0.4</em:minVersion> <em:maxVersion>2.5</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
<?xml version="1.0"?> <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>mozilla@refreshaustin.org</em:id> <em:version>1.0</em:version> <em:type>2</em:type> <em:name>Goodbye Cruel World</em:name> <em:description>Hello World is just too happy</em:description> <!-- Fennec --> <em:targetApplication> <Description> <em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id> <em:minVersion>0.1</em:minVersion> <em:maxVersion>1.0.*</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF> install.rdf
content refresh chrome/content/ application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://browser/content/browser.xul chrome://refresh/content/main.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} chrome.manifest
content refresh chrome/content/ application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://browser/content/browser.xul chrome://refresh/content/main.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} chrome.manifest
content refresh chrome/content/ application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://browser/content/browser.xul chrome://refresh/content/main.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} chrome.manifest
<?xml version="1.0"?> <overlay id="refresh" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbox id="navigator-toolbox"> <label>I'm so emo.</label> </toolbox> </overlay> main.xul
<?xml version="1.0"?> <overlay id="refresh" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbox id="navigator-toolbox"> <label>I'm so emo.</label> </toolbox> </overlay> main.xul
<?xml version="1.0"?> <overlay id="refresh" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbox id="status-bar"> <toolbar id="ruwt-toolbar“> <vbox> <label>I'm so emo.</label> <label onmouseover="alert('I love Paramore.')" style="color:red;font-weight:bold">My fingernails are black.</label> </vbox> </toolbar> </toolbox> </overlay> main.xul
<?xml version="1.0"?> <?xml-stylesheethref="chrome://refresh/content/css/main.css" type="text/css"?> <overlay id="refresh" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbox id="status-bar"> <toolbar id="ruwt-toolbar“> <vbox> <label>I'm so emo.</label> <label onmouseover="alert('I love Paramore.')" style="color:red;font-weight:bold">My fingernails are black.</label> </vbox> </toolbar> </toolbox> </overlay> main.xul
<?xml version="1.0"?> <?xml-stylesheethref="chrome://refresh/content/css/main.css" type="text/css"?> <overlay id="refresh" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript" src="chrome://refresh/content/js/main.js"/> <toolbox id="status-bar"> <toolbar id="ruwt-toolbar“> <vbox> <label>I'm so emo.</label> <label onmouseover="alert('I love Paramore.')" style="color:red;font-weight:bold">My fingernails are black.</label> </vbox> </toolbar> </toolbox> </overlay> main.xul
<target name="widgets.mozilla.build" depends="init, clean" description="Builds Mozilla Toolbar .xpi install file"> <mkdir dir="${out.mozilla}"/> <mkdir dir="${dist}"/> <copy todir="${out.mozilla}"> <fileset dir="${widgets.mozilla}"/> </copy> <zip destfile="${dist}/ruwt.xpi" basedir="${out.mozilla}"/> </target> ANT Build
set x=extension_name xcopy %x% build /i /e xcopy build\content build\chrome\content /i /e rmdir /s /q build\content cd build\chrome 7z a -tzip "%x%.jar" * -r -mx=0 cd ..\.. rmdir /s /q build\chrome\content rmdir /s /q build\chrome\locale rmdir /s /q build\chrome\skin replace chrome.manifest build cd build 7z a -tzip "%x%.xpi" * -r -mx=9 cd .. move build\%x%.xpi %x%.xpi rmdir /s /q build Windows Build