2005年11月3日 星期四

Firefox 擴充套件 (Extension) 寫作入門之四

擴充套件之安裝設定
  • install.rdf
    • http://developer.mozilla.org/en/docs/Install_Manifests
    • 產生 GUID - http://developer.mozilla.org/en/docs/Generating_GUIDs
    • Target Application GUIDs
Firefox      {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6}
  • 範例
<?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>myextension@mysite.com</em:id> <!-- (Firefox 1.5 ~ ?) -->
<em:id>{22870005-adef-4c9d-ae36-d0e1f2f27e5a}</em:id> <!-- (Firefox 1.0) -->
<em:version>1.0</em:version>
<em:type>2</em:type>

<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.0+</em:minVersion>
<em:maxVersion>1.5</em:maxVersion>
</Description>
</em:targetApplication>

<!-- Front End MetaData -->
<em:name>Sample!</em:name>
<em:description>A test extension</em:description>
<em:creator>Your Name Here</em:creator>
<em:homepageURL>http://www.foo.com/</em:homepageURL>
</Description>
</RDF>

沒有留言: