Monday, June 3, 2024
126
rated 0 times [  132] [ 6]  / answers: 1 / hits: 20009  / 10 Years ago, tue, july 22, 2014, 12:00:00

How can I get the URLs of recently visited tabs using chrome.history API, specifically, the last 10 URLs visited?


More From » google-chrome

 Answers
45

Pass an empty string as your query to the search() method of the chrome.history API. For example, this will log the 10 most recently visited URLs to the console:



chrome.history.search({text: '', maxResults: 10}, function(data) {
data.forEach(function(page) {
console.log(page.url);
});
});

[#70099] Monday, July 21, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cartersinceren

Total Points: 442
Total Questions: 116
Total Answers: 106

Location: San Marino
Member since Thu, Jun 30, 2022
2 Years ago
cartersinceren questions
Thu, Nov 5, 20, 00:00, 4 Years ago
Thu, Apr 16, 20, 00:00, 4 Years ago
Fri, Feb 1, 19, 00:00, 5 Years ago
;