My first Chrome extension – Google Web History Updater

Google Web History Updater extension icon

Google Web History Updater extension icon

I’ve created my first extension for Google Chrome – Google Web History Updater!

One of my favorite features of the Google Toolbar is that it records your browsing history in Google Web History.  If you don’t like that feature or are paranoid about Google keeping information about you then you might as well stop reading now.

The benefits of Google Web History are that Google uses your history to personalize your search results, and that you can track down a site you visited while on another computer.

Unfortunately Google Toolbar isn’t available in Chrome.  The reasons for this are fairly clear (Chrome doesn’t do toolbars at all because of its minimalist aesthetic) but I still missed my Google Web History.

Several people entered bug reports for adding Toolbar’s features to the browser, but I got tired of waiting and decided to try and make an extension that would update Web History.  I quickly hit a dead end and contacted the Chrome developers to ask them for help.  They said there was no published API for updating Web History and suggested I reverse engineer the way Toolbar does it.  I couldn’t work out how to do it, and the developers said that the Toolbar team were thinking about making an official extension to do it, so I waited some more.

Then I read an article that reminded me that some browsers (Opera) have had this problem for a long time, and there was a solution available for them – the UseGoogleWebHistory userscript.  This is a small javascript file that runs whenever a page loads, and sends the URL to Web History.  I could have converted the userscript to an extension pretty easily or even had the conversion done for me automatically using a new feature of Chrome but although the userscript worked, it didn’t work for every URL.  I couldn’t work out what was wrong with it, so I went looking for another solution.

It turns out that sending a URL to Web History is actually done as a side effect of asking Google for the PageRank of the URL.  This means that PageRank extensions like this one actually do exactly what I want, except that they also take up space on the screen.

I ended up just modifying that extension (mostly just removing the UI) so I can’t take much credit, but the majority of the code is lifted from the Toolbar anyway.

In the end I got what I wanted – Chrome updating Web History.

Reblog this post [with Zemanta]
  • http://www.easyrecovery.co.uk/ data recovery

    I also liked Chrome ad my first extension was page rank checker. It worked perfectly for me.

  • http://www.easyrecovery.co.uk/ data recovery

    I also liked Chrome ad my first extension was page rank checker. It worked perfectly for me.

  • Akjack+guest

    Idea for an extension: One that lets you access the complete text of any page in your history. (If you search in your history, you will see by the resulting snippets that Chrome is *already* storing this text. There just doesn’t seem to be any way to *access* it, except for those little snippets.)

  • http://openid-provider.appspot.com/dddhhhzz Wei

    This is just awesome!! I wish I found this out one year before!.

  • Guest

    hi

    great extension. thank you!

    but it could be a bit more exactly. example: i’m surfing several pages of a specific website and in web history it appears as

    studiVZ | Bist Du schon drin?
    studiVZ | Bist Du schon drin?
    studiVZ | Bist Du schon drin?
    studiVZ | Bist Du schon drin?

    the page title is always repeating, but in real it was..

    studiVZ | Bist Du schon drin?
    studiVZ | Meine Nachrichten
    studiVZ | Meine Fotos
    studiVZ | Meine Gruppen

    is it possible to track the real title of a page without repeating always the one above?

  • http://www.wizardstower.co.uk/ ghosttie

    That’s strange – can you post some URLs that this happens on?

  • singh

    its not working from last 3 days for me ..
    i tried on three different locations. suddenly it has stooped working.
    i checked for different google accounts its not working 
    could you please look into it.

  • http://gaineysite.com/wRONgainey/wRONgainey.html wRONGainey

    I echo Singh’s observation below, it appears to have been broken, I assume by some update to Chrome. I really appreciate this extension, but I am also quite frustrated that the Chrome project has not offered their own solution.

  • http://www.wizardstower.co.uk/ ghosttie

    Sorry guys, it looks like Google is forbidding permission to the URL we’re using.  I’ll need to either find a different way of doing this or give up and delete the extension.

  • Guest

    Not working for me either… the Google search part works, but if I just go to a URL directly, the extension no longer adds the entries to my web history :(

  • http://gaineysite.com/wRONgainey/wRONgainey.html wRONGainey

    Thanks for the update, I have really found this extension very helpful. I really value the Google Web History service, but I’ve also really come to like Chrome. I may just have to go back to Firefox.

  • singh

    is this helpful..
    may be you need to change the url 
    http://www.seroundtable.com/google-pagerank-change-14132.html

  • http://www.wizardstower.co.uk/ ghosttie

    Thank you, that was helpful

  • http://www.wizardstower.co.uk/ ghosttie

    I’ve just uploaded a new version – when your Chrome next updates its extensions it should start working again.  You will need to confirm that you allow the extension because the URL it uses has changed.

  • http://www.wizardstower.co.uk/ ghosttie

    I’ve just uploaded a new version – when your Chrome next updates its extensions it should start working again.  You will need to confirm that you allow the extension because the URL it uses has changed.
    <

  • http://www.wizardstower.co.uk/ ghosttie

    I’ve just uploaded a new version – when your Chrome next updates its extensions it should start working again.  You will need to confirm that you allow the extension because the URL it uses has changed.
    <

  • http://gaineysite.com/wRONgainey/wRONgainey.html wRONGainey

    We’re back in business. Thanks a bunch!

  • http://izmirescortbayan.com/ izmirescortbayan.com

    good thank…