MozillaZine

Modifying Firefox extensions for SeaMonkey 2.0

Talk about add-ons and extension development.
Prognathous
 
Posts: 60
Joined: November 26th, 2002, 4:21 pm

Post Posted July 11th, 2009, 4:55 pm

I modified IE-Tab according to the instructions in this page, and it works with the build I'm using (20090711/2.0b1pre). Feel free to try it, but I can't guarantee that it won't cause a mess:

http://prognathous.mail-central.com/moz ... sm-win.xpi

Prog.

P.S
I've done the same with two more extensions:

LinkVisitor - http://prognathous.mail-central.com/moz ... 3.3-sm.xpi
Tab Clicking Options - http://prognathous.mail-central.com/moz ... -0.6.9.xpi

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted July 12th, 2009, 1:32 pm

Prognathous wrote:I modified IE-Tab according to the instructions in this page, and it works with the build I'm using (20090711/2.0b1pre). Feel free to try it, but I can't guarantee that it won't cause a mess:

http://prognathous.mail-central.com/mozilla/ie_tab-1.5.20090525-sm-win.xpi

Hi!

Glad you found https://developer.mozilla.org/En/Extensions_support_in_SeaMonkey_2 useful. Is there anything we can add to this page that you think would be useful for other people modifying extensions for SeaMonkey?

Prognathous wrote:I've done the same with two more extensions:
LinkVisitor - http://prognathous.mail-central.com/mozilla/linkvisitor-3.3-sm.xpi
Tab Clicking Options - http://prognathous.mail-central.com/mozilla/tabclickingoptions-0.6.9.xpi

Easy wasn't it? How about contacting the authors of these extensions and pointing out how easy it was to get their extensions working in SeaMonkey?

Phil

Prognathous
 
Posts: 60
Joined: November 26th, 2002, 4:21 pm

Post Posted July 13th, 2009, 12:20 am



Thank you, yes. It's a really useful page. I enjoy SM 2.0 a lot more now that I have all my favorite extensions working :)

Is there anything we can add to this page that you think would be useful for other people modifying extensions for SeaMonkey?


The only thing I wasted a lot of time on was getting the working folder to package into a correct zip file. My mistake was to zip the actual folder, rather than browse into it, select its entire content and then zip that instead. I'm using tugzip via the shell integration (context menu actions).

The other thing I did that is a bit, well, questionable, is replace the target with SeaMonkey only, rather than add support for SeaMonkey in addition to the targets already supported by the extension. It was a quick way to cut corners in order to get the extension to work. I don't really know how what is required to add support for another target. It would be good it the page explained that part too, preferably with a code snippet that demonstrates the correct XML for multiple targets. I'd be happy for some pointers here, because I really prefer to do this right.

Prognathous wrote:Easy wasn't it? How about contacting the authors of these extensions and pointing out how easy it was to get their extensions working in SeaMonkey?


Good idea, but I prefer to know a bit more about what I'm doing before I tell "real" extension writers what's required to get things to work. Maybe if I do it right (by adding support, rather than replacing it), I'll feel more at ease giving them advise.

Prog.

BenoitRen

User avatar
 
Posts: 5926
Joined: April 11th, 2004, 10:20 am
Location: Belgium

Post Posted July 13th, 2009, 9:31 am

Just insert another em:targetApplication node. Like this:
Code: Select all
<em:targetApplication> <!-- SeaMonkey -->
  <Description>
    <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
    <em:minVersion>1.0</em:minVersion>
    <em:maxVersion>2.0.*</em:maxVersion>
  </Description>
</em:targetApplication>
<em:targetApplication> <!-- Firefox -->
  <Description>
    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
    <em:minVersion>1.0</em:minVersion>
    <em:maxVersion>3.0.*</em:maxVersion>
  </Description>
</em:targetApplication>

Prognathous
 
Posts: 60
Joined: November 26th, 2002, 4:21 pm

Post Posted July 13th, 2009, 9:38 am

Thanks, but what about the rest of the implementation? The changes I made to support SeaMonkey mean that even if the extension gets installed on Firefox, it won't work correctly.

Prog.

BenoitRen

User avatar
 
Posts: 5926
Joined: April 11th, 2004, 10:20 am
Location: Belgium

Post Posted July 13th, 2009, 5:36 pm

It's the same approach with the rest. Add entries instead of changing them.

Prognathous
 
Posts: 60
Joined: November 26th, 2002, 4:21 pm

Post Posted July 13th, 2009, 10:51 pm

Is there a simple extension I could go over to see how this should be implemented?

Thanks,
Prog.

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted July 14th, 2009, 1:55 am

Prognathous wrote:Is there a simple extension I could go over to see how this should be implemented?

Well I've kept some notes on all the extensions I've modified.
Overview:
http://downloads.mozdev.org/xsidebar/mods/mod-notes
Detailed changes in diff -U format:
http://downloads.mozdev.org/xsidebar/mods/diffs.zip
Note: install.js and the various contents.rdf files are only needed for SeaMonkey 1.x.

Final results: http://xsidebar.mozdev.org/modifiedmisc.html

p.s. I am going to ask a moderator to split this part of the thread and move it to Extension Development.

Phil

LIMPET235
Moderator

User avatar
 
Posts: 37595
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted July 14th, 2009, 2:21 am

Split & moved as requested.
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-56.0.1/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
RadioYachting.
(Always choose the "Custom" Install.)

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest