Closed rajeshmr82 closed 2 years ago
@rajeshmr82 Thanks for the changes! It works great on Firefox. Some changes that can improve the experience:
Edit: Also, it would be great if this can be implemented for Chrome as well. @rajeshmr82 would you be adding Chrome implementation on this PR?
@blenderskool Thanks for the review! Good point about the 'current tab'. I will address that. As for Chrome, it does not expose a time stamp field like FireFox does. Only way we can get that info is to fetch tabs in their order displayed and then keep track of focus change from that point on. https://developer.chrome.com/docs/extensions/reference/tabs/ Let me research how this can be done for Chrome.
@blenderskool I have updated code to remove current/active tab from the search result. Chrome does not provide a timestamp field (like lastAccessed in case of FireFox) so it is not possible to sort by last accessed. The next best thing is to keep track of active tabs. However, since the active tab is removed from search result it doesnt make sense to do that. If this sounds good, please accept the PR.
Couple of other things I noticed,
@rajeshmr82 Cool. I'll accept this PR but will keep the issue open for Chrome implementation in case others have any idea. Answers to your questions:
Fixes #69
Change is to do sort based on lastAccessed field. So it works for Firefox, but Chrome doesn't have such a field it retains the current behavior