Hacking the Browser W5 HW

For my Hacking the Browser final, I would like to create a Chrome extension that can monitor my browser activity (to add to my suite of trackers) and produce hourly values for:

  1. the total number of tabs open at the end of the hour
    • chrome.tabs.query(object queryInfo, function callback)
  2. the total number of windows open at the end of the hour
    • chrome.windows.getAll(object getInfo, function callback)
  3. the total number of tabs opened during the hour
    • chrome.tabs.onCreated.addListener(function callback)
  4. the total number of windows opened during the hour
    • chrome.windows.onCreated.addListener(function callback)
  5. the total number of tabs looked at during the hour
    • chrome.tabs.onActivated.addListener(function callback)
  6. the favicon from every updated tab
    • chrome.tabs.onUpdated.addListener(function callback)
    • tab.favIconUrl (this requires the “tabs” permission)

I believe I’ll only require a background script for this project, as I won’t be inserting any code into the pages I visit, and won’t need a browser or page action. The difficult part will be figuring out how to access the data every hour. There must be an easier way, but my only idea at the moment is to do an AJAX post to MongoDB….

Posted in HW

Leave a Reply

Your email address will not be published. Required fields are marked *