Browse Source

Bug 1721863 - Dead Links and Bug 1725024 Add information about extension writing - Merge branch 'staging'

Frank-Rainer Grahl 3 years ago
parent
commit
243178f962

+ 1 - 0
lib/sitemap.xml

@@ -885,6 +885,7 @@ http://www.damowmow.com/portal/ (use the "Indentify" field)
     <page url="dev/get-involved" title="Get Involved" id="get-involved" />
     <page url="dev/qa-verification" title="QA Verification" id="qa-verification"/>
     <page url="dev/code-development" title="Building &amp; Source Code" id="code-development"/>
+    <page url="dev/extensions" title="Extensions" id="extensions"/>
     <page url="dev/useful-sites" title="Useful Sites" id="useful-sites"/>
     <page url="dev/nightly" title="Nightly Builds" id="nightly" />
     <page url="dev/project-areas" title="Project Areas" id="project-areas" />

+ 303 - 0
src/dev/extensions.en.html

@@ -0,0 +1,303 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Language" content="en">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<meta http-equiv="Content-Script-Type" content="text/javascript">
+
+<link rel="top" href="../" title="SeaMonkey Project">
+<link rel="up" href="./" title="Development">
+
+<title>Extensions</title>
+</head>
+<body>
+<h1>SeaMonkey Extensions</h1>
+
+<p>
+SeaMonkey supports toolkit/-style extensions.
+</p>
+
+<h2 id="The_Basics">The Basics</h2>
+
+<p>
+To support SeaMonkey as a target application, you need to add it to the list
+of target applications in the extension's install.rdf file. The code for that
+will look something like this:
+</p>
+
+<pre>&lt;em:targetApplication&gt;
+  &lt;!-- SeaMonkey --&gt;
+  &lt;Description&gt;
+    &lt;em:id&gt;{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}&lt;/em:id&gt;
+    &lt;em:minVersion&gt;2.0&lt;/em:minVersion&gt;
+    &lt;em:maxVersion&gt;2.*&lt;/em:maxVersion&gt;
+  &lt;/Description&gt;
+&lt;/em:targetApplication&gt;</pre>
+
+<p>
+The install.js is not supported any more and should be removed.
+</p>
+
+<h2 id="Differences">Differences as compared to other toolkit/-based
+applications</h2>
+
+<ul>
+  <li>
+    <p>
+    You need to overlay/open different chrome URLs as compared to Firefox. Some
+    URLs are listed below:
+    </p>
+
+    <table style="height: 69px; width: 100%;">
+      <tbody>
+        <tr style="background-color: rgb(204, 255, 204);">
+          <td>URL in Firefox</td>
+          <td>URL in SeaMonkey</td>
+          <td>Overlays</td>
+        </tr>
+        <tr>
+          <td><a class="external" rel="freelink">chrome://browser/content/browser.xul</a></td>
+          <td><a class="external" rel="freelink">chrome://navigator/content/navigator.xul</a></td>
+          <td>Main browser window</td>
+        </tr>
+        <tr>
+          <td><a class="external" rel="freelink">chrome://browser/content/pageinfo/pageInfo.xul</a></td>
+         <td><a class="external" rel="freelink">chrome://navigator/content/pageinfo/pageInfo.xul</a></td>
+         <td>Page Info window</td>
+        </tr>
+        <tr>
+          <td><a class="external" rel="freelink">chrome://browser/content/bookmarks/bookmarksPanel.xul</a></td>
+          <td><a class="external" rel="freelink">chrome://communicator/content/bookmarks/bookmarksPanel.xul</a></td>
+        </tr>
+        <tr>
+          <td><a class="external" rel="freelink">chrome://browser/content/places/places.xul</a></td>
+          <td><a class="external" rel="freelink">chrome://communicator/content/places/places.xul</a></td>
+        </tr>
+      </tbody>
+    </table>
+    Old versions of <strong>Thunderbird</strong> use mostly the same chrome URLs
+    for overlaying as SeaMonkey. There are exceptions, but these are few and far
+    between.
+  </li>
+  <li>
+    <p>
+    SeaMonkey also uses different IDs for the menu items. Some important menu
+    IDs are listed below, menu IDs are based on Firefox 3 source code:
+    </p>
+
+    <table style="height: 223px; width: 800px;">
+      <tbody>
+        <tr style="background-color: rgb(204, 255, 255);">
+          <td><strong>Menu id in Firefox</strong></td>
+          <td><strong>Menu id in SeaMonkey</strong></td>
+          <td><strong>Overlays</strong></td>
+        </tr>
+        <tr>
+          <td>menu_FilePopup</td>
+          <td>menu_FilePopup</td>
+          <td>File menu popup</td>
+        </tr>
+        <tr>
+          <td>menu_EditPopup</td>
+          <td>menu_EditPopup</td>
+          <td>Edit menu popup</td>
+        </tr>
+        <tr>
+          <td>menu_viewPopup</td>
+          <td>menu_View_Popup</td>
+          <td>View menu popup</td>
+        </tr>
+        <tr>
+          <td>goPopup</td>
+          <td>goPopup</td>
+          <td>Go menu popup</td>
+        </tr>
+        <tr>
+          <td>placesPopupset</td>
+          <td>placesPopupset</td>
+          <td>History menu popup</td>
+        </tr>
+        <tr>
+          <td>bookmarksMenuPopup</td>
+          <td>bookmarksMenuPopup</td>
+          <td>Bookmarks menu popup</td>
+        </tr>
+        <tr>
+          <td>menu_ToolsPopup</td>
+          <td>taskPopup</td>
+          <td>Tools menu popup</td>
+        </tr>
+        <tr>
+          <td>windowPopup</td>
+          <td>windowPopup</td>
+          <td>Window menu popup</td>
+        </tr>
+        <tr>
+          <td>-</td>
+          <td>helpPopup</td>
+          <td>Help menu popup</td>
+        </tr>
+      </tbody>
+    </table>
+  </li>
+</ul>
+
+<h2 id="URLbar_Icons">URLbar Icons</h2>
+
+<p>
+To display a button with a menupopup in the urlbar-icons for both Firefox and
+SeaMonkey, use this code:
+</p>
+
+<p>
+  <code>
+&lt;hbox id="urlbar-icons"&gt;<br>
+  &lt;image popup="myExt-menu"/&gt;<br>
+&lt;/hbox&gt;<br>
+&lt;window id="main-window"&gt;<br>
+  &lt;menupopup id="myExt-menu"&gt;<br>
+    &lt;menuitem label="menuitem"/&gt;<br>
+    &lt;menuitem label="menuitem"/&gt;<br>
+    &lt;menuitem label="menuitem"/&gt;<br>
+  &lt;/menupopup&gt;<br>
+&lt;/window&gt;
+  </code>
+</p>
+
+<p>Instead of</p>
+
+<p>
+  <code>
+&lt;hbox id="urlbar-icons"&gt;<br>
+  &lt;button type="menu"&gt;<br>
+    &lt;menupopup&gt;<br>
+      &lt;menuitem label="menuitem"/&gt;<br>
+      &lt;menuitem label="menuitem"/&gt;<br>
+      &lt;menuitem label="menuitem"/&gt;<br>
+    &lt;/menupopup&gt;<br>
+  &lt;/button&gt;<br>
+&lt;/hbox&gt;
+  </code>
+</p>
+
+<p>
+<strong>Technical Note:</strong> The code that opens the URL history popup just
+looks for any menupopup, so it goes wrong if you add your own. Ordinary popups
+are fine of course.
+</p>
+
+<h2 id="The_Statusbar">The Statusbar</h2>
+
+<p>
+In Firefox a new <code>vbox</code> has been added, called "browser-bottombox",
+which encloses the find bar and status bar at the bottom of the browser window.
+Although this doesn't affect the appearance of the display, it may affect your
+extension if it overlays chrome relative to these elements.
+</p>
+
+<p>
+For example, if you overlay some chrome before the status bar, like this:
+</p>
+
+<pre>
+&lt;vbox id="browser-bottombox"&gt;
+  &lt;something insertbefore="status-bar" /&gt;
+&lt;/vbox&gt;
+</pre>
+
+<p>
+Use the following technique to make your overlay work on both SeaMonkey and
+Firefox (pre-57):
+</p>
+
+<pre>
+&lt;window id="main-window"&gt;
+  &lt;vbox id="browser-bottombox" insertbefore="status-bar"&gt;
+    &lt;something insertbefore="status-bar" /&gt;
+  &lt;/vbox&gt;
+&lt;/window&gt;
+</pre>
+
+<h2 id="Thunderbird_3">Thunderbird 3</h2>
+
+<h3 id="gFolderDisplay_API">gFolderDisplay API</h3>
+
+<p>SeaMonkey only supports a reduced set of methods:</p>
+
+<ul>
+ <li>selectedCount</li>
+ <li>selectedMessage</li>
+ <li>selectedMessageUri</li>
+ <li>selectedMessageIsFeed</li>
+ <li>selectedMessageIsImap</li>
+ <li>selectedMessageIsNews</li>
+ <li>selectedMessageIsExternal</li>
+ <li>selectedIndices</li>
+ <li>selectedMessages</li>
+ <li>selectedMessageUris</li>
+ <li>canArchiveSelectedMessages</li>
+ <li>displayFolder</li>
+ <li>focusedPane</li>
+ <li>messageDisplay</li>
+</ul>
+
+<h3 id="gMessageDisplay_API">gMessageDisplay API</h3>
+
+<p>SeaMonkey only supports a reduced set of methods:</p>
+
+<ul>
+ <li>displayedMessage</li>
+ <li>isDummy</li>
+ <li>visible</li>
+</ul>
+
+<h2 id="Multi-browser_compatibility">Multi-browser compatibility</h2>
+
+<p>
+To make an extension compatible with SeaMonkey as well as Firefox/Thunderbird,
+you may need to do different things depending on which application is running
+the extension.
+</p>
+
+<h3 id="In_JavaScript_code">In JavaScript code</h3>
+
+<p>
+You can use the following technique to detect the application:
+</p>
+
+<pre>
+const FIREFOX_ID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
+const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}";
+const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
+var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
+                        .getService(Components.interfaces.nsIXULAppInfo);
+if (appInfo.ID == FIREFOX_ID) {
+  // running under Firefox
+} else if (appInfo.ID == THUNDERBIRD_ID) {
+  // running under Thunderbird
+} else if (appInfo.ID == SEAMONKEY_ID) {
+  // running under SeaMonkey
+} else {
+  // another app
+}
+</pre>
+
+<h3 id="In_manifest_file">In manifest file</h3>
+
+<p>
+SeaMonkey uses different overlays than other applications. You can use the
+application flag to select which overlay should be used with which application:
+</p>
+
+<pre>
+<code>
+overlay chrome://browser/content/browser.xul chrome://myaddon/content/ffOverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
+overlay chrome://messenger/content/mailWindowOverlay.xul chrome://myaddon/content/tbOverlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
+overlay chrome://navigator/content/navigator.xul chrome://myaddon/content/smOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
+</code>
+</pre>
+
+</body>
+</html>

+ 11 - 13
src/releases/seamonkey2.53.7.1/index.en.html

@@ -506,8 +506,9 @@ Please read this before reporting any new bugs.
     <dd>
     We need help from developers and the testing community to provide as much
     feedback as possible to make SeaMonkey even better. Please read these notes
-    and the <a href="http://developer.mozilla.org/en/Bug_writing_guidelines">bug
-    filing instructions</a> before reporting any bugs to
+    and the <a
+    href="https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html">Bug Writing
+    Guidelines</a> before reporting any bugs to
     <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.
     </dd>
   </dt>
@@ -540,14 +541,13 @@ Please read this before reporting any new bugs.
     <dd>
     A tarball of the [% rnote.name %] source code is available at the
     <a href="../[% rnote.version %]#source">download page</a>.
-    The latest development code can be obtained from the
-    <a href="http://developer.mozilla.org/en/Comm-central_source_code_(Mercurial)">source
-    repository</a>.
-    SeaMonkey-specific source is in the "suite" directory. Please follow the
-    <a href="http://developer.mozilla.org/en/docs/Build_Documentation">build
-    instructions</a>.
-    We will provide source code for 2.53.1 and future releases on
-    <a href="https://gitlab.com/seamonkey-project">gitlab</a>.
+    The latest development code can be obtained from the <a
+    href="../../dev/code-development#central">source repository</a>.
+    SeaMonkey-specific source is in the "suite" directory. Please follow the <a
+    href="../../dev/code-development#building">build instructions</a>.
+    We provide source code for 2.53.1 and future releases on
+    <a href="https://gitlab.com/seamonkey-project">gitlab</a> accessible using
+    the web components polyfill add-on.
     </dd>
   </dt>
 
@@ -569,9 +569,7 @@ The following resources contain useful information about [% rnote.name %]:
 <!--  <li><a href="https://wiki.mozilla.org/SeaMonkey/Features/[% rnote.version %]">&quot;SeaMonkey/Features/[% rnote.version %]&quot;
     wiki page</a>
   </li> --->
-  <li><a href="http://developer.mozilla.org/En/Extensions_support_in_SeaMonkey_2">For
-    extension developers</a>
-  </li>
+  <li><a href="../../dev/extensions">For extension developers</a></li>
 </ul>
 </div>
 

+ 11 - 13
src/releases/seamonkey2.53.7/index.en.html

@@ -542,8 +542,9 @@ Please read this before reporting any new bugs.
     <dd>
     We need help from developers and the testing community to provide as much
     feedback as possible to make SeaMonkey even better. Please read these notes
-    and the <a href="http://developer.mozilla.org/en/Bug_writing_guidelines">bug
-    filing instructions</a> before reporting any bugs to
+    and the <a
+    href="https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html">Bug Writing
+    Guidelines</a> before reporting any bugs to
     <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.
     </dd>
   </dt>
@@ -576,14 +577,13 @@ Please read this before reporting any new bugs.
     <dd>
     A tarball of the [% rnote.name %] source code is available at the
     <a href="../[% rnote.version %]#source">download page</a>.
-    The latest development code can be obtained from the
-    <a href="http://developer.mozilla.org/en/Comm-central_source_code_(Mercurial)">source
-    repository</a>.
-    SeaMonkey-specific source is in the "suite" directory. Please follow the
-    <a href="http://developer.mozilla.org/en/docs/Build_Documentation">build
-    instructions</a>.
-    We will provide source code for 2.53.1 and future releases on
-    <a href="https://gitlab.com/seamonkey-project">gitlab</a>.
+    The latest development code can be obtained from the <a
+    href="../../dev/code-development#central">source repository</a>.
+    SeaMonkey-specific source is in the "suite" directory. Please follow the <a
+    href="../../dev/code-development#building">build instructions</a>.
+    We provide source code for 2.53.1 and future releases on
+    <a href="https://gitlab.com/seamonkey-project">gitlab</a> accessible using
+    the web components polyfill add-on.
     </dd>
   </dt>
 
@@ -605,9 +605,7 @@ The following resources contain useful information about [% rnote.name %]:
 <!--  <li><a href="https://wiki.mozilla.org/SeaMonkey/Features/[% rnote.version %]">&quot;SeaMonkey/Features/[% rnote.version %]&quot;
     wiki page</a>
   </li> --->
-  <li><a href="http://developer.mozilla.org/En/Extensions_support_in_SeaMonkey_2">For
-    extension developers</a>
-  </li>
+  <li><a href="../../dev/extensions">For extension developers</a></li>
 </ul>
 </div>
 

+ 9 - 13
src/releases/seamonkey2.53.8.1/index.en.html

@@ -532,8 +532,8 @@ Please read this before reporting any new bugs.
     We need help from developers and the testing community to provide as much
     feedback as possible to make SeaMonkey even better. Please read these notes
     and the <a
-    href="https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines">bug
-    filing instructions</a> before reporting any bugs to
+    href="https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html">Bug Writing
+    Guidelines</a> before reporting any bugs to
     <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.
     </dd>
   </dt>
@@ -567,13 +567,12 @@ Please read this before reporting any new bugs.
     A tarball of the [% rnote.name %] source code is available at the
     <a href="../[% rnote.version %]#source">download page</a>.
     The latest development code can be obtained from the <a
-    href="https://www.seamonkey-project.org/dev/code-development#central">source
-    repository</a>.
-    SeaMonkey-specific source is in the "suite" directory. Please follow the
-    <a href="http://developer.mozilla.org/en/docs/Build_Documentation">build
-    instructions</a>.
-    We will provide source code for 2.53.1 and future releases on
-    <a href="https://gitlab.com/seamonkey-project">gitlab</a>.
+    href="../../dev/code-development#central">source repository</a>.
+    SeaMonkey-specific source is in the "suite" directory. Please follow the <a
+    href="../../dev/code-development#building">build instructions</a>.
+    We provide source code for 2.53.1 and future releases on
+    <a href="https://gitlab.com/seamonkey-project">gitlab</a> accessible using
+    the web components polyfill add-on.
     </dd>
   </dt>
 
@@ -595,10 +594,7 @@ The following resources contain useful information about [% rnote.name %]:
 <!--  <li><a href="https://wiki.mozilla.org/SeaMonkey/Features/[% rnote.version %]">&quot;SeaMonkey/Features/[% rnote.version %]&quot;
     wiki page</a>
   </li> --->
-  <li><a
-    href="https://developer.mozilla.org/en-US/docs/Archive/Add-ons/SeaMonkey_2">For
-    extension developers</a>
-  </li>
+  <li><a href="../../dev/extensions">For extension developers</a></li>
 </ul>
 </div>
 

+ 9 - 13
src/releases/seamonkey2.53.8/index.en.html

@@ -579,8 +579,8 @@ Please read this before reporting any new bugs.
     We need help from developers and the testing community to provide as much
     feedback as possible to make SeaMonkey even better. Please read these notes
     and the <a
-    href="https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines">bug
-    filing instructions</a> before reporting any bugs to
+    href="https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html">Bug Writing
+    Guidelines</a> before reporting any bugs to
     <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.
     </dd>
   </dt>
@@ -614,13 +614,12 @@ Please read this before reporting any new bugs.
     A tarball of the [% rnote.name %] source code is available at the
     <a href="../[% rnote.version %]#source">download page</a>.
     The latest development code can be obtained from the <a
-    href="https://www.seamonkey-project.org/dev/code-development#central">source
-    repository</a>.
-    SeaMonkey-specific source is in the "suite" directory. Please follow the
-    <a href="http://developer.mozilla.org/en/docs/Build_Documentation">build
-    instructions</a>.
-    We will provide source code for 2.53.1 and future releases on
-    <a href="https://gitlab.com/seamonkey-project">gitlab</a>.
+    href="../../dev/code-development#central">source repository</a>.
+    SeaMonkey-specific source is in the "suite" directory. Please follow the <a
+    href="../../dev/code-development#building">build instructions</a>.
+    We provide source code for 2.53.1 and future releases on
+    <a href="https://gitlab.com/seamonkey-project">gitlab</a> accessible using
+    the web components polyfill add-on.
     </dd>
   </dt>
 
@@ -642,10 +641,7 @@ The following resources contain useful information about [% rnote.name %]:
 <!--  <li><a href="https://wiki.mozilla.org/SeaMonkey/Features/[% rnote.version %]">&quot;SeaMonkey/Features/[% rnote.version %]&quot;
     wiki page</a>
   </li> --->
-  <li><a
-    href="https://developer.mozilla.org/en-US/docs/Archive/Add-ons/SeaMonkey_2">For
-    extension developers</a>
-  </li>
+  <li><a href="../../dev/extensions">For extension developers</a></li>
 </ul>
 </div>
 

+ 9 - 13
src/releases/seamonkey2.53.9/index.en.html

@@ -570,8 +570,8 @@ Please read this before reporting any new bugs.
     We need help from developers and the testing community to provide as much
     feedback as possible to make SeaMonkey even better. Please read these notes
     and the <a
-    href="https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines">bug
-    filing instructions</a> before reporting any bugs to
+    href="https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html">Bug Writing
+    Guidelines</a> before reporting any bugs to
     <a href="https://bugzilla.mozilla.org/">Bugzilla</a>.
     </dd>
   </dt>
@@ -605,13 +605,12 @@ Please read this before reporting any new bugs.
     A tarball of the [% rnote.name %] source code is available at the
     <a href="../[% rnote.version %]#source">download page</a>.
     The latest development code can be obtained from the <a
-    href="https://www.seamonkey-project.org/dev/code-development#central">source
-    repository</a>.
-    SeaMonkey-specific source is in the "suite" directory. Please follow the
-    <a href="http://developer.mozilla.org/en/docs/Build_Documentation">build
-    instructions</a>.
-    We will provide source code for 2.53.1 and future releases on
-    <a href="https://gitlab.com/seamonkey-project">gitlab</a>.
+    href="../../dev/code-development#central">source repository</a>.
+    SeaMonkey-specific source is in the "suite" directory. Please follow the <a
+    href="../../dev/code-development#building">build instructions</a>.
+    We provide source code for 2.53.1 and future releases on
+    <a href="https://gitlab.com/seamonkey-project">gitlab</a> accessible using
+    the web components polyfill add-on.
     </dd>
   </dt>
 
@@ -633,10 +632,7 @@ The following resources contain useful information about [% rnote.name %]:
 <!--  <li><a href="https://wiki.mozilla.org/SeaMonkey/Features/[% rnote.version %]">&quot;SeaMonkey/Features/[% rnote.version %]&quot;
     wiki page</a>
   </li> --->
-  <li><a
-    href="https://developer.mozilla.org/en-US/docs/Archive/Add-ons/SeaMonkey_2">For
-    extension developers</a>
-  </li>
+  <li><a href="../../dev/extensions">For extension developers</a></li>
 </ul>
 </div>