Open jeandrek opened 2 months ago
The workaround would be to check everything in the timeframe searched, to see if the visit ID matches, which in theory would work if the referrer is in that same timeframe, i.e. most of the time...but again, the result of searching that timeframe is an array of history items, not visit items. So it could check all visits, but that might be a bad idea when there's a colossal # of visits. OTOH checking up to a fixed # of visits for each item probably wouldn't help since getVisits
would probably be the first problem. Visits do seem to be pruned however...so if the referer is visited frequently, there's possibly no solution.
So it could check all visits
This works. It's enough work, though, to draw an as-connected-as-possible forest of the whole timeframe (or at least colour it).
For some bizarre reason,
VisitItem
s give you the visit ID of the referrer, but there is no API for getting a VisitItem from its ID. So, sadly, there's no simple way to do this in general. It's also unfortunate thatbrowser.history.search
does not give you the visits for the results.