Modded Extensions for SeaMonkey

Talk about add-ons and extension development.
Locked
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

I made a lot of progress.

What I mainly wanted to do was use my own icon on a subdomain that used the same favicon as the main domain. IOW:

subdomain.domain.com = myicon
domain.com = site's default favicon

I got it working in Opera and FireFox, but now I need someone familiar with the code to help get it working for SeaMonkey.

For Opera - the link above worked, but I didn't realize the the conversion page put a carriage return every 76 characters. So what I did was paste that into Notepad and kept changing the widths of the form so I could tell the manual breaks from the normal word wraps, then I deleted the manual breaks. I pasted that into the .js file and changed the website address and it worked fine.

For Firefox - I have a few questions, even though I got it to work correctly:
https://addons.mozilla.org/en-us/firefo ... src=search (Says it works with 20.0a1)
https://addons.mozilla.org/en-us/firefo ... ll.rdf#top says

Code: Select all

   <em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>18.0a1</em:maxVersion>


I didn't change that - I did change the name of the extension so that I could recognize it, but doesn't that mean it shouldn't work on FireFox after 18.0a1 ??? - But it installed fine on Firefox 19.0. Why?

For bootstrap.js : https://addons.mozilla.org/en-us/firefo ... rap.js#top - first off - how do you get the file to display nicely like that? I opened in in WordPad and it worked, but it was all run together and very hard to read.

Second, I didn't really know what I was doing, but I changed

Code: Select all

if(doc.domain&&doc.domain.indexOf('google.')!==-1&&(doc.domain.indexOf('google.')===0||doc.domain.indexOf('www.google.')===0))


to

Code: Select all

if(doc.domain&&doc.domain.indexOf('subdomain.domain')!==-1&&(doc.domain.indexOf('subdomain.domain')===0||doc.domain.indexOf('subdomain.domain')===0))


It worked fine, but I'm not sure why there are three entries ...

Finally, for SeaMonkey, I used this link https://developer.mozilla.org/en-US/doc ... eaMonkey_2 and changed Install.rdf to:

Code: Select all

<em:targetApplication>
         <Description>
            <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}<em:id>
            <em:minVersion>2.0</em:minVersion>
            <em:maxVersion>2.20</em:maxVersion>


With most extensions, that will get the extension to load - it might not work, but it will still load. In this case, it just said "Null could not be loaded b/c it is not compatible with SeaMonkey 2.15.2" - where did Null come from, and why didn't it work?

Finally - I don't understand the code enough to know what it is doing, so if there are any differences in bootstrap.js between Firefox and SeaMonkey, I won't know how to make them.

Thanks in advance for any help!!!
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

It Works!!!

Code: Select all

 <em:maxVersion>2.20.*</em:maxVersion>


I think that was all I changed - working great in SeaMonkey now. I'm happy!!!

Trying to show color in the code was a bad idea:

<em:maxVersion>2.20.*</em:maxVersion>
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

I do have one final question:

I downloaded Google Favicon.xpi and changed the target app in the install.rdf to SeaMonkey and it installed and worked fine.

I then made a copy of that file and modified the install.rdf and gave it a new name and modifed the bootstrap.js file.

It works fine, but Google Favicon no longer shows up in the list of Add-Ons and is not working. (My modifed file which I'll call Subdomain Favicon shows up and is working fine.)

Not a problem for me, but if I want to modify the extension to change the icon for more than one website, I'm not sure how to do it.

I think the two extensions must have the same internal number somewhere - but I'm not sure where that is stored.

Thanks in advance!!!
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Modded Extensions for SeaMonkey

Post by therube »

(Don't hold me to this, but ...)

When the extension installs, most often that "internal number" ends up being the name of the file (sans .xpi) that you see in your /extensions/ directory.
Otherwise you can just pick it out of the .xpi, from install.rdf.

Like with NoScript:

Code: Select all

 <Description about="urn:mozilla:install-manifest">
 
   <em:id>{73a6fe31-595d-460b-a920-fcc0f8843232}</em:id>
   <em:name>NoScript</em:name>
   <em:version>2.6.5.8rc3</em:version>
...


{73a6fe31-595d-460b-a920-fcc0f8843232} is the "internal name".

MDN: Generating GUIDs
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

BINGO!!!

Thanks therube (and nice to know I'm not the only one following this thread).

I looked in the extensions folder (SeaMonkey/Data/Profile/Extensions/) and saw a file named "Google09@u4space.net.xpi".

That came from this line of the install.rdf file:

Code: Select all

<em:id>Google09@u4space.net</em:id>


If I change that line, I can have multiple extensions and can individually enable and disable them.

For anyone following along with the thread, the modified extension procedure works great - I can set any icon I want for any domain or subdomain and it will show up in the tabs menu and the address bar and bookmarks when I visit the bookmark (or I imagine when I run check places). And it works in FF 19.0 and SeaMonkey 2.16 - which is more than I can say for HashColouredTabs+ or IdentFavicon.

UPDATE: After further use, this seems to work flawlessly on the tab and address bar icons. It is somewhat hit-or-miss on the bookmark and tab icons (usually it will change the icon if I visit the bookmark, but then the icon might revert to default if I reboot - or sometimes for no apparent reason. Check Places DID NOT change the bookmark icons. However, personally, beyond the tab icons, I'm only interested in the items on the Personal Bar and Bookmark Favicon Changer works fine for that!

The drawback is it's a rather cumbersome and time consuming process in that if you want to assign a favicon to a site you have to create or download the favicon, create a base64 hash of the icon file, make a copy of the Google Favicon Extension, and modify the bootstrap.js and install.rdf files to use it.

But once you do, it works great!!!!

(Forgot to mention - IdentFavicon over-writes it, so you can't use it with that, and I'm not sure what it does with HashColouredTabs - I didn't test it on a site that HCT was modifying.)
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

Apparently Mozillazine lost my last post to the thread, but it is just as well.

I figured out a little more about what I was doing - I had an icon that didn't want to convert - it would work fine in the converter/deconverter programs and fail when I pasted it into Notepad and then tried to de-convert it.

Suggestions:

Generally, you want to use 16x16 PNG images for the Favicons. SeaMonkey supports this, and it tends to produce shorter base64 tag lengths.

When you do this, you want to change this line in bootstrap.js:

var _gico='data:image/png;base64,

Actually - he originally used "png" - you want to change it to "ico" or "gif" for other file types.

I preferred these converters, but the original one will work:

http://www.opinionatedgeek.com/dotnet/t ... e64encode/
http://www.opinionatedgeek.com/dotnet/t ... fault.aspx

In Notepad - under Format - uncheck Word Wrap when pasting the base64 output or modifying the boostrap.js file. This makes it hard to read, but less likely to mess up. Also - you have to have a single quote after the base64 tag and no quote in front of it.

I'm not sure exactly what he is doing in bootstrap.js with the three URL identities, for example, I was trying to assign an icon to:

http://home.comcast.net/~bzee1b/home.html

If you look at the page, he also uses subdomains of /~bzee1a/, /~szee1a/, etc.

I originally tried using "home.comcast.net/~bzee1b/" and it failed. I ended up using "home.comcast." and that worked great, but means another user on comcast domain would get the same modified icon. I'm okay with that, but it's not ideal.

I would still like an extension like Bookmark Favicon Changer, where I can right-click on a tab and select a new icon from my hard drive and then select whether to modify the domain, the sub-domain, or the individual page with it, but there is still WAY too much I don't understand to get there (basically, all I know is crudely how he is embedding the image file and crudely how he is telling it what page to apply it to), like:
  • Why does the bootstrap.js code call out URL's three different places in slightly different ways.
  • What is the boostrap.js file changing - I know it modifies the tab icon and the address bar icon, but I can't follow the code enough to know how?
  • Is the base64 encoding required? I assume it is as Bookmark File Changer retains icons even if I delete them - but BFC is way too involved for me to try to figure out what it is doing ...

For now - I made the changes I wanted to the way SeaMonkey works, so for now I am happy!!!
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Modded Extensions for SeaMonkey

Post by therube »

I made a couple simple changes to Search Tab 2.0 so that it installs (& at least seems) to run in SeaMonkey.

"For Firefox addicts like me, it becomes difficult to use firefox with more than 20 tabs opened. This addon helps searching among the opened tabs."

search_tab-2.0-fx+SM+MOD.xpi

Note: Search is per window.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

Thanks therube!

For SeaMonkey, typically have 100-150 tabs open, but I set the minimum tab width to 16.

In Firefox, this was impractical until I installed Tab Mix Plus and set "Display Tab Bar - Tab Close Button" and "Display Tab - Uncheck Close Tab Button and set minimum width to 16".

I use Tabs Menu with SeaMonkey, but my issue was that I had several sites where the subdomain and the domain used the same favicon - and several sites with no favicon so the tab displayed the same blank square.
User avatar
xed
Posts: 669
Joined: February 11th, 2007, 12:04 pm

Re: Modded Extensions for SeaMonkey

Post by xed »

Hi,

I just installed menu editor from http://xsidebar.mozdev.org/modifiedmisc.html and tried to remove "set desktop background" from the main context menu and it did not work.

Thanks for fixing this if you can.
"Doin' right ain't got no end." Cap'n Red Legs
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Modded Extensions for SeaMonkey

Post by therube »

Appears that parts of the program will work & others not?
Like it looks like you can rearrange menu items, but actually hiding of items is ineffectual?
(An earlier thread, Right Click Menu Editor?.)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
xed
Posts: 669
Joined: February 11th, 2007, 12:04 pm

Re: Modded Extensions for SeaMonkey

Post by xed »

Hmm, thanks, therube,

I already have the Compatibility Reporter extension installed though and it apparently doesn't help.

Thanks anyway. I appreciate your trying to help me. :)
"Doin' right ain't got no end." Cap'n Red Legs
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: Modded Extensions for SeaMonkey

Post by Tiger-Heli »

Good news / Bad news ...

Good news - Sonthakit replied back to me and said that she (?) is willing to develop Tab Icon Changer extension.

Bad news - There is a pending change to Firefox 22 (and ultimately SeaMonkey) https://bugzilla.mozilla.org/show_bug.cgi?id=834457 that will break Bookmark Favicon Changer, so understandably, Sonthakit is concentrating on that before working on a new extension (which might or might not have the same issues as BFC with the new code changes).

UPDATE 4Apr2013 - BFC is maybe NOT as broken as Sonthakit thought. I tested an install over my existing installs of FF 23 and SeaMonkey 2.22 (Nightly builds). All of my custom Bookmarks that I had previously changed with BFC remained changed, but I was unable to make any new changes using the extension. I informed Sonthakit, but she told me a few weeks ago she was giving up on Firefox development, and I don't know what would be involved in getting BFC working again.

UPDATE 5Apr2013 - Sonthakit officially quit - https://sites.google.com/site/sonthakit ... -developer - As I said, I tested with the latest nightlies and previous BFC changes were retained, but new sites don't work, I don't know what it would take to fix the extension.
Last edited by Tiger-Heli on April 5th, 2013, 5:06 am, edited 2 times in total.
Retep8
Posts: 48
Joined: March 27th, 2010, 9:49 am

Re: Modded Extensions for SeaMonkey

Post by Retep8 »

Installed SM2.17 this morning.
Extension "Send Filter 1.0.5.1" does not work any more.
On another PC, with SM2.16.2, it woks as it should.
User avatar
xed
Posts: 669
Joined: February 11th, 2007, 12:04 pm

Re: Modded Extensions for SeaMonkey

Post by xed »

Is there any way that this extension could be made compatible with SeaMonkey 2.17.1?

https://addons.mozilla.org/en-US/firefo ... ortimport/

I would just like the ability to export/import cookies from one profile to another.

Thank you for any help you may provide.
"Doin' right ain't got no end." Cap'n Red Legs
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Modded Extensions for SeaMonkey

Post by therube »

Adding a SeaMonkey section (you have to remove the "em:" prefixes) gets it to install in SeaMonkey.
But then thinking that this line (at minimum) also needs a change, but I wouldn't know what to?

Code: Select all

  var  popup=window.document.getElementById('menu_ToolsPopup');

Suppose we call that something else?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Locked