Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox: Plugin vs extension?

I'm unclear on the difference between the functioning of a plugin vs an extension.

For years, I've written a plain old NPAPI plugin. It lived in /Library/ Plug-ins on mac and somewhere similar on a PC. With Firefox 3.6, it stopped working. Looking around, I see this: http://blog.mozilla.com/security/2009/11/16/component-directory-lockd... which I figure might be the problem, so I try to turn my plugin into an XPI, but this turns it into an extension.

I install it, and it STILL doesn't work, but now I don't know if it doesn't work because extensions are a different beast than plugins, and so what I did makes no sense at all, or whether it's because of whatever the underlaying problem was before is still around, and so what I did was a waste of time, and didn't actually address the problem...

Can anyone give me some guidance here?

thanks.

like image 779
Brian Postow Avatar asked Feb 02 '10 22:02

Brian Postow


People also ask

Is plugin the same as extension?

The main difference between the two is that plug-in provides extra functionality which does not modify the core functionality. While extension is made for modifying core functionality, may be provided due to version change or improvement.

What is a Firefox plugin?

Extensions are like apps for Firefox. They add features to Firefox to make browsing faster, safer, or just plain fun. See all extensions. Translation tools. See staff picks. YouTube customization.

Why would you use Browse extension or plug-in?

Browser extensions are usually tasked with adding additional features and functionalities to a website. But they can also be used to remove unwanted features and functionalities such as pop-up ads and other aspects of a website's core behavior that a user wishes to opt out of.

Does Firefox have plug ins?

Mozilla Firefox has thousands of add-ons, extensions, and plugins for adding features and functionality to the browser, which helps enhance a user's overall experience.


2 Answers

The answer is "it's because of whatever the underlaying problem was before is still around". The lockdown post clearly states that you'll have problems only if you put your files inside Firefox.app/.../components (if you mentioned this link in your original post, you wouldn't have to try and make it into XPI).

The relationship between extensions and plugins is: an extension may include plugin(s), among other things. You can install plugins (without making them into an extension) in Firefox.

As for your original problem, unfortunately I have no idea why it doesn't work. I'm not well-versed with debugging NPAPI plugins and the only bit of information you shared is that it doesn't work in Firefox 3.6 :)

As a first step, does it appear in about:plugins or in Tools -> Addons?

like image 156
Nickolay Avatar answered Sep 23 '22 05:09

Nickolay


You can install a plugin as part of an extension (optionally using an XPI) if you want.

The reason that your plugin stopped working in Firefox 3.6 is almost definitely that Firefox 3.6 stopped supporting the XPCOM method of providing a scripting interface. Most likely, your plugin loads but you can't talk to it in javascript.

For more information, look here: http://colonelpanic.net/2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/

Also, if you need to update it, you might consider using FireBreath, which extracts a lot of that complexity away from you.

like image 32
taxilian Avatar answered Sep 23 '22 05:09

taxilian