Developing Firefox Extensions with GNU/Linux
QT writes "Ars Technica has a lengthy but useful introduction to
developing Firefox extensions with GNU/Linux. This guide comes hot on the heels of the RC for Beta 1 of Firefox.
The article is a little more thorough than necessary, but I can't complain about anything that spurs Firefox development." From the article: "What can you do with a Firefox Extension? Firefox extensions can modify the Firefox user interface. This includes adding buttons to tool bars and menus; changing fonts, colors, and icons; capturing events in the client interface like page loads and clicks; and modifying web pages after the browser loads them and before the user sees them. All of this functionality comes with the aspect-oriented facility of overlays. Extensions also have as much access to the file system as the user running Firefox. Extensions can add protocol handlers, hooking actions to URLs like icq://, aim://, or stantz://. Extensions have UniversalXPConnect privileges, allowing them to harness any XPCOM component. Firefox comes with a rich library of XPCOM components that permit your extension to drive very low-level functionality like sockets from Javascript. You can also augment the XPCOM library with Firefox extensions by adding Javascript, linkable libraries, or XPIDL."
since these things have full access to the local machine, remind me why we love extensions and hate activex?
Where's my bittorrent:// protocol??!?!
I would love to simply do a bittorrent from firefox. I think that'd spur alot more users and make it easier to... um... *LEGAL* download torrents... (like knoppix, fedora, etc.)
Bring on the torrents!!!
A grammar mistake and a spelling mistake in the same phrase. Learn English, guys.
And that statment "RC for Beta 1 of Firefox" without the "v 1.5" modifier implies that Firefox is something new that is about to be released. Does no one even try to edit these things?
You do realize that these mistakes distract readers' attention from the actual article content, right?
...XPCOM library...
"XPCOM: OS Defence" being the most popular.
*this space intentionally left blank
"One of the four pointers saying 'come and see', and I saw, and beheld a white
Firefox extensions are are useful and powerful tools when used correctly, yet have the ability to easily become malicious and destructive if the user doesn't pay attention.
Hmmm, sounds a lot like ActiveX. While the main intent for the two is a little different (browser tweaking vs. client-side scripting & server interaction), both require users to make informed decisions. People going on about how Firefox is so much safer because it doesn't support ActiveX might need to consider dropping that argument. As Firefox's market share grows, so will the number of websites that advertise Firefox plugins, and unaware users will be just as susceptible to malware and viruses as they were with IE.
"What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
/)
It's called Thunderbird, not Firebird.
Ewige Blumenkraft.
I realize that there are some differences, such as the fact that the red carpet is only rolled out for extensions the user trusts, but... when you advertise Firefox to dummies, your trusting users will BE dummies!
When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion it is called Rel
Instead of bouncing spam, you just harrass & send spam to some poor guy who had his email address borrowed by some spam bot. Congratulations! You just became as bad as the spammers.
Speaking as someone currently undergoing such a "borrowing" - it sucks.
Please for the love of god people, don't bounce messages back saying "My spam filter has blocked your message". I didn't send it, I don't care. Leave me alone!!!!!
---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"
The problem is he probably ISN'T a spambot. The FROM header is very easily spoofed. His machine need not be the sender for the message to claim it came from him.
Please tell me you didn't write that flame-ish post because of the new options panel. Can't figure out any other "significant" change in the UI, though.
Switch back to Slashdot's D1 system.
How about the way Microsoft copied Firefox almost exactly with their popup blocker toolbar?
-1 Flamebait.
Discussing the security vulnerabilities is entirely appropriate, but bringing them up on every Firefox article when it is completely off-topic is flamebait.
I'm not a spambot you moron. Go read up on SMTP and some back when you know what you're talking about. The FROM and REPLY-TO headers are spoofed (trivially easy) and the spamees aren't checking my domain's SPF records. Nothing to do with me whatsoever, other than getting me flooded with bounce messages.
---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"
Has anyone seen galley copies of Pro Firefox: Extension and Application Development? Or does anyone have any other suggestions for dead-tree guides for developing firefox extensions? I know of books on XUL , but none targetted for basic extension programming.
These are a few sites that I found helpful. Some are a little old but I got something out of all of them.
c reate-firefox-extensions/
i on_tutorial.php
p ackaging/extensions.html
/
http://www.xulplanet.com/
http://kb.mozillazine.org/Dev_:_Extensions
http://roachfiend.com/archives/2004/12/08/how-to-
http://businesslogs.com/technology/firefox_extens
http://www.bengoodger.com/software/mb/extensions/
http://mozilla-firefox-extension-dev.blogspot.com
http://books.mozdev.org/index.html
http://www.mozilla.org/xpfe/gettingstarted.html
Of course another good way to learn about extensions is to download a few and look at the code. That has probably been the biggest help to me once the tutorials, etc. gave me the basic idea of what is going on.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
Everyone needs to realize that this is indeed needed functionality. What kind of browser would it be if you couldn't save a .zip file or anything else to your hard drive? Any program you've ever used has the ability to be harmful. Let me repeat that: Any program you've ever used has the ability to be harmful.
It's all the ability to trust what you're putting on your hard drive to begin with. I run Windows on one box and Linux on the other. I tend to run OSS software on my Windows box too. Why? Because I tend to trust it more! I can rest (mostly) assured of the peer review process in an OSS app, and that if some nasty mal/spyware is included, or if it crashes systems left and right, that the community will let me know that before it ever gets to my hard drive to begin with.
I would be even more assured, could I read/write C/C++; but for my needs this process works fine.
If you don't know the reputation of the source of a binary, you probably shouldn't be downloading it.
I obviously digress; but extensions for Firefox is not a problem. Malicious programs abound, be careful where you get your apps.
put the what in the where?
good luck finding a compiler built into the kernel
www.gaian-mind.org - eco-punk/crust coop and collective | www.anarchistfederation.org - so cal anarchist federation
> Does no one even try to edit these things?
:)
:)
There's a common saying around here...what is it? Oh yes: "You must be new here!" Or was that a rhetorical question?
> You do realize that these mistakes distract readers' attention
And if you've ever had your site slashdotted, you're probably grateful for anything that distracts some percentage of the readers.
Actually it should be -1 Offtopic for being a spelling/wrong-wording post. The submitter presumably intended to say "hot on the heels", as "hot on the heals" is nonsense.
You are misinformed. That info bar was in SP2 betas for months before Firefox shamelessly ripped it off.
Whenever I hear the word 'Innovation', I reach for my pistol.
When should you use a Firefox extension?
Only when you're EXTENDING FIREFOX.
If your website requires an extension (or, for that matter, ActiveX) to work, you're simply coding it incorrectly.
Possible exceptions includes Windows Update, but even then, Microsoft coded that as part of the OS in XP, so the web portal really isn't necessary.
It's better to vote for what you want and not get it than to vote for what you don't want and get it.
- E. Debs
Yes, there is a double standard about downloading ActiveX controls and XPCOM controls. XPCOM controls are at least as unsafe as ActiveX controls. At least ActiveX supports code signing, which XPCOM doesn't.
Open source has to do with the rights you have to use the code, not just that you can read the source code. It's certainly possible to write a browser extension or anything else in JavaScript that's not open source -- you just say in the comments "Copyright (C) 2005 by . All rights reserved." You don't even need to say that -- it's it copyright by default, but not open source by default.
Even if your point about being able to read XPCOM extension source code was factually correct, only an infintesimally small percentage of people actually even bother to read the code they download before they run it. And even if you can read it, it might be quite obfuscated and contain thousands of lines of code -- in fact the authors themselves might not even know that the code has security holes.
Take a look at the JavaScript source code to google maps, for example. Oh you haven't already read over every line of that code looking for security holes? That's exactly what I mean.
Please don't make the Raymondesque argument that open source code doesn't have security holes because everyone can read it, unless you personally read all the code you download before you run it yourself. Including the configure scripts!
-Don
Take a look and feel free: http://www.PieMenu.com
You don't even need to say that -- it's it copyright by default, but not open source by default.
.IQ or some other country you've never heard about? It really is a false sense of security.
Whether the license on the copyrighted JavaScript says it's "open source" or not, if you can access and read the JavaScript code, it's out there in the open for all eyeballs to look at and discuss. Whether I can find a security hole or not or whether the code is obfuscated to hell or not is not really germane, nor is whether the authors know or not if the code has security holes in it, because there is probably someone crazy enough to "deobfuscate it" (i.e., like crackers, etc., who are patient enough using tools like disassemblers, hex editors and SoftICE to break SecureROM for NOCD cracks) and make sense of it, especially if the code promises some interesting techniques to be had (like Google Maps).
Please don't make the Raymondesque argument that open source code doesn't have security holes because everyone can read it, unless you personally read all the code you download before you run it yourself
Again, I should go green salmon fishing with this can of red herring. It is far easier for SOMEONE (whether it is me, you or the geek who never leaves his grandmother's basement with the OC-3 connection to the house...) to look at the source and simulate whether there is any weaknesses in it. It's obviously easy enough to do already with complex executables and libraries without access to any form of source code.
If it's open sourced, getting any changes back into the stream are far easier than if they're discovered in closed source, especially if the vendor regards 3rd-party security discoveries with great disdain and mockery.
I think also that code signing has proven to not be as trustworthy as Microsoft has pimped it up in the past. I certainly do not regard it as "trustworthy". Accountability? Oh, please. What if the certificate was issued to some company in
XPCOM extensions for Firefox are compiled binary machine language files, which have just as much access to your system as ActiveX controls do. Firefox XPCOM extensions are no more secure than ActiveX controls. Binary ActiveX and XPCOM controls are useful for situations where you need to do things that JavaScript doesn't support, like shaping the window of a pie menu (an open source ActiveX component, that you can download the source code if you like).
Internet Explorer has something similar to the way you can write Firefox extensions in JavaScript and UIL. But that's a totally different thing than binary ActiveX controls and behaviors, and it severly restricts what you can do.
You can script trustable ActiveX controls for Internet Explorer called "Dynamic HTML Behavior Components", using JavaScript (or any other ActiveX compatible scripting languages), XML and DHTML.
For example, user interface components like JavaScript Pie Menus for Internet Explorer or the Run On Sentence dynamic text animation style run with the same restrictions as JavaScript in the browser, so they can't access files or shape popup windows. (Also open source).
-Don
Take a look and feel free: http://www.PieMenu.com
is one for freenet:<uri> URLs.
A Firefox plugin for supponting such URLs would be a huge boost for freenet.
www.freenetproject.org
-- In the beginning was the WORD, and the WORD was UNSIGNED, and the main(){} was without form and void...
That's awesome.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
here you can find another tutorial, although it's a bit old now.
But I like how Python comes up yet again. It's nice, for once in my life, to learn a language and *then* see it catch on in a big way, instead of finishing learning a language on the very last day before it dies. I'm predicting that Python is going to soon be as ubiquitous as BASIC was back in the Stone Age.
good luck finding a compiler built into the kernel
... nevermind then
what, you mean GNU/Emacs does not come with a built-in compiler??? Someone'd better warn RMS soon.
oh, you meant Linux