Archive for the ‘Mozilla Firefox’ Category

Historian is on Hiatus

June 12th, 2009 No comments

I want to thank all my friends who took the time out to test Firefox Historian, and give me their feedback. In particular, a big thank you to Treena, Kenton, Glenn and Waleed. As everyone is probably aware by now, I’ve started a new project, and it is not Historian; I’m parking this for now. The client side code is downloadable from the original site,; rename the XPI code to .zip to access it.

If you want access to the server side code, please email me. If there is enough interest, I may even open-source it.

My email? It’s shahzad AT-THE-SPECIAL-PLACE the [There that should defeat the spam-slingers]

Firefox Historian Released

May 12th, 2009 1 comment

I’ve been working on a personal search engine project in my spare time for the past few weeks. This is a Firefox add-on which records your browsing history, and builds a full-text search index.

Basically, the value proposition of this site is that you’ll never need to try and remember individual sites or try and rediscover them through ‘public’ search engines. I only index publicly accessible sites that you may visit, and thus your email etc will never be indexed (as the server does not have your login information, or an implementation of the login protocol).

As far as search engines go, this is quite spartan for now. However, if there is enough interest, I’ll be happy to add enhancements and make the search better and more intuitive. The index updates every five minutes for now. If you need faster indexing, drop me a line and we can work out way to make this possible for you.

For now, you can get the Firefox add-on from here

Feedback is most welcome, but please be gentle and expect bugs, this is an early beta!


Firefox’s Built in SQLite History Database

March 31st, 2009 No comments

As of Firefox 3.0, the history and bookmarks have been stored in an SQLite instance that is natively available. You can actually interact with this database using the following JavaScript code snippet.  Now all you need is the person’s name, and voila, you know their entire browsing history !

How do you get their name, well, ask them! Provide a textbox and some incentive, and you’ll have their name and email soon enough.

Warning: I have only run this script locally, and do not know as yet how it behaves if you load it off a remotely accessed web page. If you do manage to get this working remotely, please leave a note in the comments.

Querying the Mozilla Places SQLite Datastructure

//Create Useful Shorthand Notations
var Cc = Components.classes;
var Ci = Components.interfaces;
var rc = Cc[“;1”];
var rs = rc.getService(Ci.nsINavHistoryService);
var myquery = rs.getNewQuery(); //returns nsINavHistoryQuery
var myqueryoptions = rs.getNewQueryOptions(); // return sINavHistoryQueryOptions

//Execute the query on the History Object

var myresult = rs.executeQuery(
); // returns nsINavHistoryResult

var node = myresult.root; //Of type nsINavHistoryResultNode;

//Parse the results, and collect the URLS in the following string

var collect_string = “”;

//var node = result.root;
node.containerOpen = true;
for (var i = 0; i < node.childCount; i ++) {
var node_new = node.getChild(i);
collect_string += node_new.uri + “\n”;
node.containerOpen = false;