So I want to simulate default history of chrome with chrome extension. I tried using mostly every event in chrome.history or chrome.webNavigation, but it always returned ton of data for example every redirect from https to https or just / or some weird urls, but when you visit for example https://developer.chrome.com, in history you will have just developer.chrome.com, but in chrome.history you will have like 5 records.
chrome.webNavigation.onDOMContentLoaded.addListener(function(page) {
console.log(page+' -webNavigation');
});
chrome.history.onVisited.addListener(function(page) {
console.log(page+' -history');
});
Can you help me please?
EDIT: These are the outputs: Visited this site - developer.chrome.com 6 outputs from webNavigation:
https://developer.chrome.com/home -webNavigation
https://apis.google.com/u/0/se/0/_/+1/fastbutton?usegapi=1&siz..... -webNavigation
https://accounts.google.com/o/oauth2/postmessageRelay?parent=h..... -webNavigation
https://www.youtube.com/embed/1OSyfD1zOiY -webNavigation
about:blank -webNavigation
about:blank -webNavigation
2 outputs from history:
https://developer.chrome.com/ -history
https://developer.chrome.com/home -history
Another visited site www.youtube.com/. 1 output from webNavigation:
https://www.youtube.com/ -webNavigation
2 outputs from history
http://www.youtube.com/ -history
https://www.youtube.com/ -history
But in built-in history there is just one log
developer.chrome.com
and
www.youtube.com