'Chrome.History get referring URL (TypeScript)

I would like to write a chrome extension which not only lists the URLs visited in the History, but the referring URLs as well. For example, if I clicked on Wikipedia from Google, it should say "Wikipedia: referred to by Google".

My initial attempt was to take a HistoryItem for the URL in question, extract its most recent VisitItem, and then use referringVisitId to track down the initial URL. I couldn't find any solution using the VisitItem to get the referring URL. There is a similar issue from almost 5 years ago with no response so I reopen this conversation and would love to use your help.

Can I use referringVisitId to track down the referring URL? If so, how?

Thanks, Or



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source