click here to install my dummy extension
If you get a Firefox security warning that states "Firefox prevented this site (mark.koli.ch) from asking you to install
software on your computer", then you must click the "Allow" button on the warning dialog to install the dummy/demo extension.
Some notes on this installer:
- This extension only supports Mozilla Firefox. If you click the "click here to install this extension" link in any other browser, you will get an alert box that says "Sorry, this extension only supports Mozilla Firefox." This is not the native/default behavior; I had to add a few lines of code into the script to check the browser type before installing.
- If you're in Firefox, press CTRL-U to view the source of this page.
- If you're interested in seeing what's inside of my dummy Hello World Firefox extension, you can download it here. The ZIP file contains an ant script which you can use to build the extenstion from scratch if you'd like.
- You can download the XPI (pre-packaged FF extension file) here.
- The extension itself does nothing. It's a dummy does-nothing Hello World extension. Once installed you'll see the extension in the Firefox Tools->Add-Ons menu as shown below.
Here's the code that actually triggers the extenstion installation:
$(document).ready(function($){
$("a[iconURL]").click(function(e){
if(!$.browser.mozilla){
alert("Sorry, this extension only supports Mozilla Firefox.");
return false;
}
var params = {
"Mark Kolich's Hello World Extension":
{ URL: e.target, IconURL: $(this).attr("iconURL"),
toString: function () { return this.URL; }
}
};
InstallTrigger.install(params);
return false;
});
});
Once installed you can find the extension in the Tools->Add-Ons menu of Firefox: