Taking Notes While Browsing the Web: An Idea for a Roam Research Plugin

As I’m browsing the web, I’d like to be able to take notes in Roam Research. In this post, I share an idea I have for a plugin or browser extension that I think would improve the experience of taking notes in Roam while browsing the web.

The plugin would do two main things automatically:

  1. It would automatically insert some browsing history information into your Roam database while you browse the internet.

  2. As you navigate the web, it would automatically bring you to the Roam page that corresponds to the web page you’re reading.

Mind the Details

Of course, the implementation details matter! You don’t want to be whisked away from the notes you’re taking just because you’ve clicked a link in a different window.

So, here I’ll explain a few of the details I think would make this a good note taking experience.

As I’m browsing the internet, all the websites I visit will get added to a page “{Date} Browsing History”. A new Roam page will be created for each new website visited. And there will be a Roam window that always stays open to the Roam page for the current website I have open in my browser.

What qualifies as a website?

By default there would be one Roam page per domain visited. However, there are several exceptions:

  • For Wikipedia it would be one Roam page per Wikipedia entry
  • For websites reached from HackerNews, Twitter, and Reddit, it would be one Roam page per link followed from the aggregator (but links followed within the reached website would not count as new websites)
  • For GitHub it would be one Roam page per user, organization, or repo visited
  • For Arxiv it would be one Roam page per paper
  • For Roam it would be one Roam page per Roam database

It will be great to have a window that always stays open to the Roam page for the current website I have open in my browser. This way if I visit a website I’ve been to before, I will see my notes from that website. And the websites I visit will be linked to the day I visit them on, and also to any other pages my notes reference.

Additionally, the tool should add a little bit of metadata to the pages it’s generating. On each of the autogenerated Roam pages, it would be great to see when I visited the website, and what was the referring page. For websites visited multiple times, seeing the earliest and most recent visit times, and the number of times I visited that website would be useful too. Total time spent on the website would be a nice bonus.

Making this a Reality

In the previous section I shared the details that I think would make this work well from a user experience perspective. How about from the technical side?

I think it would make sense to implement this as a browser extension (though a user script could work too). DK the Human, author of the Intention browser extension has made his browser extension starter kit freely available. To notice when what web page you’re browsing and determine whether it constitutes a new page, the extension would need to request permission to view your activity on all websites. For making additions to a Roam database automatically, I expect the extension would have to navigate to the appropriate Roam page in the background, and would then mimic the user actions to make the desired changes.

If you’re interested in turning this idea into a reality or want to discuss it further, don’t hesitate to reach out! I’d be excited to try a workflow like this, but don’t anticipate building it myself in the near future.