Inside Google Firefox Extensions
With the release of several Firefox extensions by Google – we can take a look at how Google officially implements PageRank queries.
Firefox extensions are packaged files. Download the extension file and unzip it, you’ll notice there are several directories. The location of source files will vary from extension to extension, so you’ll have to surf around for a bit.
For example, download the Google toolbar file (google-toolbar.xpi). Now unzip it. You’ll see a directory structure like this:
Inside the chrome directory, there is a file name google-toolbar.jar – unzip it. Now you’ll see a directory called google-toolbar. Inside this directory, you’ll see a couple more directories – go into the content directory.
But the one we really care about is pagerank.js. That’s right pagerank.js! Google’s official code for PageRank queries. I’ll leave it up to you to read through the code, but remember that mining pagerank is against Google’s terms of service, so be careful how you use it.
You might want to take a look at the Google Suggest code too – real interesting.