Thursday, November 5, 2009

Custom Firefox Search Engine


There are many great search engine add-ons for Firefox (youtube, wikipedia, amazon, etc.), and it is relatively easy to add your own. I was recently interested in creating an engine that would search for lyrics while excluding sites that require Javascript in order to view them, and giving preference to sites that organize lyrics nicely, by album and artist. Firefox search engines are specified in XML using the OpenSearch Description documents. I created one (lyrics.xml) as follows ("good_lyrics_site" and "bad_lyrics_site" names used for anonymity:


<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
 <ShortName>Lyrics Search</ShortName>
 <Description>Search lyrics, avoiding nasty javascript websites </Description>
 <InputEncoding>UTF-8</InputEncoding> 
 <Url type="text/html" template="http://www.google.com/search?as_q={searchTerms}+lyrics&as_oq=good_lyrics_site&as_eq=bad_lyrics_site" />
 <Image width="16" height="16">http://www.good_lyrics_site.com/favicon.ico</Image>
 <Developer>Philip Kilinskas</Developer> 
 <moz:SearchForm>http://www.google.com/</moz:SearchForm>
</OpenSearchDescription>

and an html file to load it:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<link rel="search" type="application/opensearchdescription+xml" title="Lyrics Search" href="lyrics.xml" /> 
</html>


For some reason, opening the html from File->Open in Firefox didn't allow me to add the search engine, but placing it on a web server did. Once you've loaded the html, pull down the search menu in the upper right corner of Firefox, and add the "Lyrics Search" search engine.






Tuesday, September 22, 2009

Updated Gnusto Plugin for Firefox 3.5

As a big fan of the Infocom games from the 80s, I was very excited to see a Z5 interpreter created as an add-on for Firefox. Unfortunately, it hasn't been updated in a long time. I've updated it to work with Firefox 3.5, but paging functionality is still buggy, so if it prints out more than a screenful of information, you'll need to scroll back manually to read it all.

Updated version here:

http://www.megaupload.com/?d=X8TBN5E0

Monday, July 27, 2009

Cookie Button in the Status Bar for FF 3.5

Greetings. Currently this blog only exists as a convenient centralized place for me to dump stuff intended for public use. I've been holding off upgrading from Firefox 3.0 to Firefox 3.5 because some of my favorite addons were not available for the new version. Often it is a very trivial matter to get them working again; 90% of the time the old addon is compatible with the latest version of Firefox, but the author has not explicitly put this information in the plugin. So the first thing to try is to grab the XPI file, unzip it, and edit the file install.rdf, which contains "minVersion" and "maxVersion" fields. This is an update of "Cookie Button in the Status Bar 0.9", which now has a maxVersion of 3.5.*. It seems to be working fine for me under FF 3.5, but I haven't tested it extensively. Until I find out the best way to attach links to posts, here's a megaupload link:

http://www.megaupload.com/?d=VAF40UOJ